Command printShardingStatus failed: no such cmd: printShardingStatus

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Gone away
    • Priority: Unknown
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

       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?

       

            Assignee:
            Dmitry Lukyanov (Inactive)
            Reporter:
            meng Alicia
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: