All Documentation
General Information
All Documentation
Realm Documentation
Developer Articles & Topics
Community Forums
Blog
University
Products
Platform
Atlas
Build on a developer data platform
Database
Deploy a multi-cloud database
Search
Deliver engaging search experiences
Vector Search (Preview)
Design intelligent apps with GenAI
Stream Processing (Preview)
Unify data in motion and data at rest
Tools
Compass
Work with MongoDB data in a GUI
Integrations
Integrations with third-party services
Relational Migrator
Migrate to MongoDB with confidence
Self Managed
Enterprise Advanced
Run and manage MongoDB yourself
Community Edition
Develop locally with MongoDB
Build with MongoDB Atlas
Get started for free in minutes
Sign Up
Test Enterprise Advanced
Develop with MongoDB on-premises
Download
Try Community Edition
Explore the latest version of MongoDB
Download
Resources
Documentation
Atlas Documentation
Get started using Atlas
Server Documentation
Learn to use MongoDB
Start With Guides
Get step-by-step guidance for key tasks
Tools and Connectors
Learn how to connect to MongoDB
MongoDB Drivers
Use drivers and libraries for MongoDB
AI Resources Hub
Get help building the next big thing in AI with MongoDB
arrow-right
Connect
Developer Center
Explore a wide range of developer resources
Community
Join a global community of developers
Courses and Certification
Learn for free from MongoDB
Webinars and Events
Find a webinar or event near you
Solutions
Use cases
Artificial Intelligence
Edge Computing
Internet of Things
Mobile
Payments
Serverless Development
Industries
Financial Services
Telecommunications
Healthcare
Retail
Public Sector
Manufacturing
AI Innovators Program
Build the next big thing in AI with MongoDB
arrow-right
Developer Data Platform
Accelerate innovation at scale
Learn more
arrow-right
MongoDB for Startups
Scale quickly from ideation to IPO
Learn more
arrow-right
Solutions Library
Organized and tailored solutions to kick-start projects
Explore solutions
arrow-right
Company
Careers
Start your next adventure
Blog
Read articles and announcements
Newsroom
Read press releases and news stories
Partners
Learn about our partner ecosystem
Leadership
Meet our executive team
Company
Learn more about who we are
Contact Us
Reach out to MongoDB
Let’s chat
arrow-right
Investors
Visit our investor portal
Learn more
arrow-right
Pricing
Support
Sign In
Try Free
menu-vertical
Docs Menu
MongoDB Documentation
MongoDB Manual
6.0
Introduction
Installation
MongoDB Shell (mongosh)
MongoDB CRUD Operations
Aggregation Operations
Data Models
Indexes
Security
Replication
Sharding
Change Streams
Time Series
Transactions
Administration
Storage
Frequently Asked Questions
Reference
Collation
Configuration File Options
Connection Strings
Database Commands
Default MongoDB Port
Default MongoDB Read Concerns/Write Concerns
Exit Codes and Statuses
Explain Results
Glossary
Log Messages
MongoDB Cluster Parameters
MongoDB Limits and Thresholds
MongoDB Package Components
MongoDB Server Parameters
MongoDB Wire Protocol
mongosh
Methods
Collection Methods
Cursor Methods
Database Methods
Query Plan Cache Methods
Bulk Operation Methods
User Management Methods
Role Management Methods
Replication Methods
Sharding Methods
convertShardKeyToHashed
sh.abortReshardCollection()
sh.addShard()
sh.addShardTag()
sh.addShardToZone()
sh.addTagRange()
sh.balancerCollectionStatus()
sh.commitReshardCollection()
sh.disableBalancing()
sh.enableBalancing()
sh.disableAutoSplit
sh.enableAutoSplit
sh.enableSharding()
sh.getBalancerState()
sh.help()
sh.isBalancerRunning()
sh.moveChunk()
sh.removeRangeFromZone()
sh.removeShardTag()
sh.removeShardFromZone()
sh.removeTagRange()
sh.reshardCollection()
sh.setBalancerState()
sh.shardCollection()
sh.splitAt()
sh.splitFind()
sh.startBalancer()
sh.status()
sh.stopBalancer()
sh.waitForBalancer()
sh.waitForBalancerOff()
sh.waitForPingChange()
sh.updateZoneKeyRange()
Object Constructors and Methods
Connection Methods
Client-Side Field Level Encryption Methods
Operators
Stable API
Server Sessions
System Collections
Legacy
mongo
Shell
Release Notes
Technical Support
Docs Home
→
MongoDB Manual
sh.help()
sh.help()
Returns:
a basic help text for all sharding related shell functions.
←
sh.getBalancerState()
sh.isBalancerRunning()
→
Share Feedback