sh.setBalancerState()

On this page

Description

Important

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

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

ParameterTypeDescription
statebooleanSet this to true to enable the balancer and false to disable it.