Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
In this article
Applies to: ✅ Azure Data Explorer
Changes the database sharding policy. The sharding policy is used to manage data sharding for databases and tables by defining if and how extents (data shards) should be sealed.
When a database is created, it contains the default data sharding policy. All tables created in the database inherit this policy unless the policy is explicitly overridden at the table level.
You must have at least Database Admin permissions to run this command.
.alter
database
DatabaseName policy
sharding
PolicyObject
Learn more about syntax conventions.
Name | Type | Required | Description |
---|---|---|---|
DatabaseName | string |
✔️ | The name of the database for which to alter the sharding policy. |
PolicyObject | string |
✔️ | A policy object that defines the sharding policy. For more information, see the sharding policy. |
Returns a JSON representation of the policy.
The following command returns the updated extents sharding policy for the database:
.alter database MyDatabase policy sharding
```
{
"ShardEngineMaxRowCount" : 750000,
"ShardEngineMaxExtentSizeInMb" : 1024,
"ShardEngineMaxOriginalSizeInMb": 2048
}
```