Courseiva
Sharding →mediumMultiple Choice

C100DBA Sharding Practice Question

An administrator notices that the balancer in a MongoDB sharded cluster is repeatedly migrating chunks between two shards, causing performance degradation. The administrator wants to temporarily stop the balancer to investigate. Which command should be used on mongos?

⚠ Common exam trap

The trap here is using the lower-level setBalancerState(false) or an invalid helper name instead of the proper sh.stopBalancer() method that cleanly stops migrations.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

sh.stopBalancer()

To temporarily stop the MongoDB balancer, an administrator should run sh.stopBalancer() on mongos. This command disables the balancer and waits for any in-progress migrations to finish, ensuring a clean stop. It is the standard helper for this purpose. The balancer can be restarted with sh.startBalancer().

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    db.runCommand({balancerStop: 1}) on the admin database

    Why it's wrong here

    The balancerStop command is the underlying command that sh.stopBalancer() wraps, but it must be run against the admin database. Running it from a non-admin database will fail. Additionally, using the helper sh.stopBalancer() is the standard and recommended approach, as it handles the admin database context automatically.

  • ✓

    sh.stopBalancer()

    Why this is correct

    The sh.stopBalancer() method is the correct command to disable the balancer on a sharded cluster. It must be run on mongos and stops the balancer from initiating new chunk migrations. This allows the administrator to investigate the issue without ongoing migrations affecting performance. The balancer can be restarted later with sh.startBalancer().

  • ✗

    sh.disableBalancer()

    Why it's wrong here

    sh.disableBalancer() is not a valid MongoDB shell helper. The correct method is sh.stopBalancer(). There is no disableBalancer method in the sh namespace. Using an invalid command will result in an error and will not stop the balancer.

  • ✗

    sh.setBalancerState(false)

    Why it's wrong here

    While sh.setBalancerState(false) does disable the balancer, it is a lower-level command that may not wait for in-progress migrations to complete. sh.stopBalancer() is preferred because it also waits for the balancer to stop any current migrations before returning. Using setBalancerState(false) could leave migrations running, which might not fully address the performance issue.

About these practice questions

Courseiva writes every C100DBA question from scratch — 222 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official MongoDB exam blueprint

This C100DBA practice question is part of Courseiva's free MongoDB certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the C100DBA exam.