cdr delete shardCollection
The cdr delete shardCollection command deletes a sharding definition, and then stops data sharding.
Syntax
Element | Description | Restrictions |
---|---|---|
definition_name | The name of the sharding definition that is used for distributing data across multiple database servers. | Must be the name of an existing definition. |
Usage
Use the cdr delete shardCollection command to delete a sharding definition, and then stop data sharding.
Return codes
A return code of 0 indicates that the command was successful.
If the command is not successful, one of the following error codes is returned: 99, 196, 229.
For information about these error codes, see Return Codes for the cdr Utility.
Example
For this example, you have a sharding
definition that was created by the following command:
cdr define shardCollection collection_1 db_1:john.customers_1
--type=delete --key=col2 --strategy=hash --versionCol=version
shard_server_A
shard_server_B
shard_server_C
The following example deletes collection_1, and stops the sharding of table customers_1:
cdr delete shardCollection collection_1