nerdexam
MongoDB

C100DBA · Question #103

Write the command(s) are correct to enable sharding on a database "testdb" and shard a collection "testCollection" with _id as shard key. Answer: sh.enableSharding("testdb") &…

Sign in or unlock C100DBA to reveal the answer and full explanation for question #103. The question stem and answer options stay visible for context.

Sharding

Question

Write the command(s) are correct to enable sharding on a database "testdb" and shard a collection "testCollection" with _id as shard key. Answer: sh.enableSharding("testdb") & sh.shardCollection("testdb.testCollection", {_id : 1 }, true )

Options

  • Ash.enableSharding("testdb") & sh.shardCollection("testdb.testCollection", {_id : 1 }, true )

Unlock C100DBA to see the answer

You've previewed enough free C100DBA questions. Unlock C100DBA for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.

Topics

#enableSharding#shardCollection#shard key#sh commands
Full C100DBA Practice