ALTER READWRITE_SPLITTING RULE ENABLE/DISABLE
Description
The ALTER READWRITE_SPLITTING RULE ENABLE/DISABLE syntax is used to enable/disable a specified read source for specified readwrite-splitting rule.
Syntax
AlterReadwriteSplittingRule ::=
'ALTER' 'READWRITE_SPLITTING' 'RULE' ruleName ('ENABLE' | 'DISABLE') storageUnitName ('FROM' databaseName)?
ruleName ::=
identifier
storageUnitName ::=
identifier
databaseName ::=
identifierSupplement
- When
databaseNameis not specified, the default is the currently usedDATABASE. IfDATABASEis not used,No database selectedwill be prompted.
Example
- Disable a specified read source for specified readwrite-splitting rule in specified database
ALTER READWRITE_SPLITTING RULE ms_group_0 DISABLE read_ds_0 FROM sharding_db;- Enable a specified read source for specified readwrite-splitting rule in specified database
ALTER READWRITE_SPLITTING RULE ms_group_0 ENABLE read_ds_0 FROM sharding_db;- Disable a specified read source for specified readwrite-splitting rule in current database
ALTER READWRITE_SPLITTING RULE ms_group_0 DISABLE read_ds_0;- Enable a specified read source for specified readwrite-splitting rule in current database
ALTER READWRITE_SPLITTING RULE ms_group_1 ENABLE read_ds_0;Reserved word
ALTER, READWRITE_SPLITTING, RULE, ENABLE, DISABLE, FROM