Docs Menu

Docs HomeMongoDB Manual

sh.enableBalancing()

On this page

  • Description
sh.enableBalancing(namespace)

Enables the balancer for the specified namespace of the sharded collection.

Important

You can only run sh.enableBalancing() on a mongos instance. sh.enableBalancing() errors if run on mongod instance.

The sh.enableBalancing() method has the following parameter:

Parameter
Type
Description
namespace
string
The namespace of the collection.

Important

For more information on the balancing process, see Manage Sharded Cluster Balancer and Sharded Cluster Balancer.

←  sh.disableBalancing()sh.disableAutoSplit →

On this page

Share Feedback
© 2022 MongoDB, Inc.

About

  • Careers
  • Investor Relations
  • Legal Notices
  • Privacy Notices
  • Security Information
  • Trust Center
© 2022 MongoDB, Inc.