Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-4584

Command printShardingStatus failed: no such cmd: printShardingStatus

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Gone away
    • Icon: Unknown Unknown
    • None
    • None
    • None
    • None

    Description

       I want to get the  collection shard key infomation and used the following code, whitch return error with  "Command printShardingStatus failed: no such cmd: printShardingStatus"

      ```

      using MongoDB.Driver; var client = new MongoClient("mongodb://reeeer:3*eefhu@124.9.75.107:8888,124.9.76.69:8888"); var database = client.GetDatabase("admin"); var command = new BsonDocument {

      {"printShardingStatus", 1}

      }; var result = database.RunCommand(command); // 输出结果 Console.WriteLine(result);

      ```

      And the version of mongodb.driver is 2.19.0, the version of mongodb is 4.0.2;

      The account has administrator privileges;

      Dose the driver didn't support the printShardingStatus cmd or is there an error in  my code?

       

      Attachments

        Activity

          People

            dmitry.lukyanov@mongodb.com Dmitry Lukyanov (Inactive)
            961394844@qq.com meng Alicia
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: