Navigation
This version of the manual is no longer supported.

sh.enableSharding()

sh.enableSharding(database)
Parameters:
  • database (string) – Specify a database name to shard.

Enables sharding on the specified database. This does not automatically shard any collections, but makes it possible to begin sharding collections using sh.shardCollection().