- Reference >
mongoShell Methods >- Sharding Methods >
- sh.enableSharding()
sh.enableSharding()¶
On this page
Definition¶
-
sh.enableSharding(database)¶ Enables sharding on the specified database. This does not automatically shard any collections but makes it possible to begin sharding collections using
sh.shardCollection().The
sh.enableSharding()method has the following parameter:Parameter Type Description databasestring The name of the database shard. Enclose the name in quotation marks.
See also