Find a Shard Key
To find the shard key of an existing sharded collection, use the
db.printShardingStatus()
method:
db.printShardingStatus()
For details on the db.printShardingStatus()
output, see
sh.status()
.
To find the shard key of an existing sharded collection, use the
db.printShardingStatus()
method:
db.printShardingStatus()
For details on the db.printShardingStatus()
output, see
sh.status()
.