This version of the documentation is archived and no longer
supported. View the current documentation to learn how to
upgrade your version of MongoDB.
Description
sh.enableBalancing(namespace)Enables the balancer for the specified namespace of the sharded collection.
Important
You can only run
sh.enableBalancing()on amongosinstance.sh.enableBalancing()errors if run onmongodinstance.The
sh.enableBalancing()method has the following parameter:ParameterTypeDescriptionnamespacestring
The namespace of the collection.
Important
sh.enableBalancing()does not start balancing. Rather, it allows balancing of this collection the next time the balancer runs.For more information on the balancing process, see Manage Sharded Cluster Balancer and Sharded Cluster Balancer.