Docs Menu

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().

Give Feedback
© 2021 MongoDB, Inc.

About

  • Careers
  • Legal Notices
  • Privacy Notices
  • Security Information
  • Trust Center
© 2021 MongoDB, Inc.