View Full MongoDB C100DBA Exam Dumps and Practice Test Dumps
Question 261
Which MongoDB command adds a shard to a sharded cluster?
- sh.registerShard()
- sh.createShard()
- sh.joinShard()
- sh.addShard()
Correct Answer: 4
Explanation:
The sh.addShard() helper adds a shard to an existing MongoDB sharded cluster. A shard is typically a replica set that stores a portion of the cluster’s data. Before adding a shard, DBAs should verify that the server or replica set is correctly configured and accessible from the cluster’s routing infrastructure. Afterward, administrators can inspect cluster status and balancing behavior to confirm that the shard has been recognized. Adding capacity does not automatically solve every performance problem, so workload distribution and shard-key effectiveness should also be considered.
Question 262
Which command enables sharding for a database?
- sh.enableSharding()
- sh.activateDatabase()
- sh.shardDatabase()
- sh.startSharding()
Correct Answer: 1
Explanation:
sh.enableSharding() enables sharding for a specified database. This establishes the database as a sharded database so that its collections can subsequently participate in sharding operations. Enabling database sharding alone does not automatically distribute every collection across shards. Administrators still need to configure individual collections appropriately when they should be sharded. DBAs should first evaluate the workload, shard-key design, and expected data distribution before introducing sharding. Proper planning helps avoid operational complications caused by selecting an unsuitable distribution strategy.
Question 263
Which command converts a collection into a sharded collection?
- sh.enableCollection()
- sh.distributeCollection()
- sh.shardCollection()
- sh.partitionCollection()
Correct Answer: 3
Explanation:
sh.shardCollection() enables sharding for a specific collection using a chosen shard key. The shard key determines how documents are distributed across shards and strongly influences query targeting and write distribution. DBAs should carefully analyze the application’s query patterns and data characteristics before selecting the key. Changing a shard key later can require additional administrative operations and may involve significant data movement. Administrators should therefore validate cardinality, frequency, monotonicity, and expected workload behavior before sharding an important production collection.
Question 264
Which MongoDB helper adds a shard to a zone?
- sh.assignZone()
- sh.addShardToZone()
- sh.linkShardZone()
- sh.attachZone()
Correct Answer: 2
Explanation:
sh.addShardToZone() associates a shard with a specified zone. Zones are used with zone sharding to influence where ranges of shard-key values are stored. This can support requirements such as geographic placement, hardware-specific workloads, or data-locality strategies. Assigning a shard to a zone does not by itself move data; appropriate zone ranges and balancing behavior are also involved. DBAs should carefully document zone assignments and verify that shard-key ranges correspond to the intended placement requirements.
Question 265
Which helper removes a shard from a zone?
- sh.removeZoneShard()
- sh.detachShard()
- sh.deleteShardZone()
- sh.removeShardFromZone()
Correct Answer: 4
Explanation:
sh.removeShardFromZone() removes a shard’s association with a specified zone. This can be part of reconfiguring zone-based data placement in a sharded cluster. Administrators should understand that changing zone membership can affect future balancing decisions and data placement. Existing data may require additional balancing activity before it reaches the desired arrangement. DBAs should therefore review zone ranges, shard assignments, and balancer activity before and after making changes to ensure that the resulting configuration matches operational requirements.
Question 266
Which helper assigns a shard-key range to a zone?
- sh.assignRange()
- sh.updateZoneKeyRange()
- sh.setShardRange()
- sh.mapZoneRange()
Correct Answer: 2
Explanation:
sh.updateZoneKeyRange() associates a shard-key range with a specified zone. Zone ranges allow administrators to express placement rules based on shard-key values. MongoDB’s balancer can then use these zone definitions when determining where chunks should reside. DBAs should ensure that the ranges are consistent with the selected shard key and do not create unintended overlaps or gaps. Zone configuration is particularly useful when placement requirements depend on geography, hardware characteristics, or logical data categories.
Question 267
Which MongoDB helper starts the cluster balancer?
- sh.startBalancer()
- sh.enableBalancer()
- sh.runBalancer()
- sh.activateBalancer()
Correct Answer: 1
Explanation:
sh.startBalancer() starts the balancer for a sharded cluster. The balancer helps redistribute chunks among eligible shards to maintain an appropriate distribution of data. Starting the balancer does not mean that data is immediately redistributed everywhere; balancing decisions depend on cluster state, chunk distribution, zone rules, and other conditions. DBAs should monitor balancing activity and ensure that the cluster has sufficient resources for data movement. Administrators should also understand whether balancing is already active before issuing start or stop operations.
Question 268
Which MongoDB helper stops the sharded-cluster balancer?
- sh.pauseBalancer()
- sh.disableBalancer()
- sh.stopBalancer()
- sh.endBalancer()
Correct Answer: 3
Explanation:
sh.stopBalancer() stops the balancer in a MongoDB sharded cluster. Administrators may temporarily stop balancing during certain maintenance operations when automatic chunk movement would be undesirable. However, stopping the balancer can allow data distribution to become uneven if the cluster continues changing. DBAs should document the reason for stopping it and verify that it is restarted when maintenance is complete. The impact of balancing should be considered alongside ongoing migrations, zone rules, and workload activity.
Question 269
Which helper reports whether the sharded-cluster balancer is enabled?
- sh.isBalancerRunning()
- sh.balancerEnabled()
- sh.getBalancerState()
- sh.checkBalancer()
Correct Answer: 3
Explanation:
sh.getBalancerState() reports whether the balancer is enabled in the sharded cluster. This is useful when administrators need to verify cluster configuration before investigating chunk distribution or data movement. Balancer state should be distinguished from whether a balancing operation is actively running at a particular moment. DBAs should use appropriate status information when troubleshooting uneven shard utilization. Understanding the distinction helps prevent administrators from assuming that an enabled balancer necessarily means that immediate data migration is occurring.
Question 270
Which command displays the list of configured shards?
- db.adminCommand({listShards: 1})
- db.listShards()
- sh.listShards()
- showShards()
Correct Answer: 1
Explanation:
The listShards administrative command returns information about shards configured in the sharded cluster. It is useful when administrators need a direct view of the registered shard identities and related configuration. This differs from higher-level status helpers that may present broader cluster information. DBAs can use shard-listing information when validating topology, troubleshooting routing, or confirming that a newly added shard has been registered. Administrative commands should be executed with suitable privileges and interpreted alongside replica-set and cluster monitoring information.
Question 271
Which MongoDB setting controls the maximum number of connections in a server’s internal pool?
- maxServerConnections
- maxConns
- connectionLimit
- serverPoolLimit
Correct Answer: 2
Explanation:
maxConns is a server parameter associated with controlling the maximum number of incoming connections MongoDB accepts. Connection limits are important because every active connection consumes server resources. DBAs should size connection capacity according to workload concurrency, operating-system limits, available memory, and application connection-pool behavior. Increasing the limit without considering server resources can create additional pressure rather than solving the underlying issue. Administrators should monitor actual connection utilization and investigate application-side pooling before making substantial changes to connection capacity.
Question 272
Which MongoDB command reports the current profiling level?
- db.profileStatus()
- db.getProfilingStatus()
- db.currentProfiler()
- db.showProfiling()
Correct Answer: 2
Explanation:
db.getProfilingStatus() returns the current database profiler configuration. It can show information such as the active profiling level and related timing settings. MongoDB profiling can help administrators investigate slow operations, but detailed profiling can create additional overhead and generate substantial diagnostic data. DBAs should therefore configure profiling carefully and use it for targeted troubleshooting or monitoring requirements. Reviewing the current status before changing profiler settings helps administrators understand the existing diagnostic configuration and avoid unnecessary changes.
Question 273
Which MongoDB method changes the database profiler level?
- db.setProfilingLevel()
- db.configureProfiler()
- db.enableProfiler()
- db.profileLevel()
Correct Answer: 1
Explanation:
db.setProfilingLevel() changes the MongoDB database profiler configuration. Profiling levels determine which operations are recorded, allowing administrators to capture diagnostic information about database activity. Higher profiling levels can generate more data and potentially increase overhead, so DBAs should select settings appropriate for the troubleshooting objective. Profiling configuration should be reviewed after an investigation to ensure that temporary diagnostic settings do not remain unnecessarily active. Administrators should also consider complementary server metrics when analyzing performance rather than relying exclusively on profiler output.
Question 274
Which profiler setting controls the threshold for slow operations?
- slowThresholdMS
- slowOpLimitMS
- slowms
- profileSlowMS
Correct Answer: 3
Explanation:
The slowms profiler setting specifies the time threshold used when identifying operations as slow for profiling purposes. Administrators can adjust this threshold according to workload characteristics and diagnostic requirements. A threshold suitable for one environment may be inappropriate for another because normal operation times vary by workload, hardware, and query complexity. DBAs should avoid selecting an extremely low threshold without considering the resulting diagnostic volume. Profiling data should be reviewed alongside query execution statistics and application behavior to distinguish genuinely problematic operations from expected workload variation.
Question 275
Which profiler setting controls the fraction of eligible operations sampled?
- samplingRate
- sampleRate
- profileSampling
- operationSamplePercent
Correct Answer: 2
Explanation:
The sampleRate profiler setting controls the fraction of operations sampled when sampling behavior is applicable. Sampling can reduce the volume of profiling information while still providing representative diagnostic data. This can be useful in busy environments where recording every eligible operation would generate excessive information. DBAs should choose the sampling configuration according to the purpose of the investigation and workload volume. Administrators should also understand the difference between a slow-operation threshold and sampling behavior because these settings influence what diagnostic information is captured in different ways.
Question 276
Which MongoDB collection stores database profiler entries?
- system.profile
- system.profiler
- admin.profile
- config.profile
Correct Answer: 1
Explanation:
system.profile is the collection associated with MongoDB database profiler information. When profiling is enabled, MongoDB records qualifying operation details there for administrative analysis. DBAs can inspect profiler records to investigate query duration, command behavior, and other performance characteristics. Because profiler data itself consumes resources, administrators should monitor its size and operational impact. The profiler should be configured intentionally rather than left at an unnecessarily detailed level in a busy production workload without a clear diagnostic purpose.
Question 277
Which MongoDB command displays replication lag for secondaries?
- rs.printSecondaryReplicationInfo()
- rs.showLag()
- rs.secondaryLag()
- rs.getReplicationDelay()
Correct Answer: 1
Explanation:
rs.printSecondaryReplicationInfo() displays replication information for secondary members, including their approximate replication lag relative to the primary. This is useful when administrators need a quick view of how far secondaries are behind. Replication lag can result from workload pressure, network latency, slow storage, or other resource constraints. DBAs should monitor lag over time rather than relying on a single measurement. Persistent or increasing lag may require investigation of oplog availability, secondary resource utilization, query workload, and network conditions.
Question 278
Which replica-set setting prevents a member from becoming primary?
- primaryDisabled: true
- priority: 0
- election: false
- canLead: false
Correct Answer: 2
Explanation:
A replica-set member configured with priority: 0 cannot become primary during elections. This is useful for members intended to remain secondary, such as reporting nodes or members with specialized placement requirements. A priority-zero member can still replicate data and may serve appropriate read workloads depending on its configuration. DBAs should understand that election eligibility and read eligibility are separate concepts. Changing priorities can affect future elections, so administrators should carefully evaluate replica-set topology before modifying member configuration.
Question 279
Which replica-set option delays a member’s replication by a configured period?
- replicationDelay
- lagSeconds
- secondaryDelaySecs
- slaveDelay
Correct Answer: 3
Explanation:
The secondaryDelaySecs setting configures a delayed replica-set member so that it intentionally remains behind the primary by a specified number of seconds. Delayed members can provide a recovery point that predates recent accidental changes or data modifications. They are not substitutes for independent backups because they replicate the same underlying data stream and can inherit certain problems. DBAs should carefully monitor delayed members and ensure that their configuration matches the intended recovery strategy. Delayed replicas can be valuable as one component of a broader operational recovery design.
Question 280
Which replica-set member setting makes a secondary hidden from normal discovery?
- hidden: true
- visible: false
- discoverable: false
- private: true
Correct Answer: 1
Explanation:
Setting hidden: true on a replica-set member prevents the member from being normally exposed to clients during server discovery. Hidden members are useful for specialized workloads such as reporting or backup processes that should not receive ordinary application traffic. A hidden member still participates in replication according to its configuration. DBAs should combine the hidden setting with appropriate priority and voting configuration when designing specialized members. Administrators should also verify application driver behavior because client connection and read-preference settings determine which replica-set members can actually be selected.