ALTER DB_DISCOVERY RULE
Description
The ALTER DB_DISCOVERY RULE
syntax is used to alter a database discovery rule.
Syntax
Grammar Railroad diagram
AlterDatabaseDiscoveryRule ::=
'ALTER' 'DB_DISCOVERY' 'RULE' databaseDiscoveryDefinition (',' databaseDiscoveryDefinition)*
databaseDiscoveryDefinition ::=
ruleName '(' 'STORAGE_UNITS' '(' storageUnitName (',' storageUnitName)* ')' ',' 'TYPE' '(' 'NAME' '=' typeName (',' propertiesDefinition)? ')' ',' 'HEARTBEAT' '(' propertiesDefinition ')' ')'
propertiesDefinition ::=
'PROPERTIES' '(' key '=' value (',' key '=' value)* ')'
ruleName ::=
identifier
storageUnitName ::=
identifier
typeName ::=
identifier
discoveryHeartbeatName ::=
identifier
key ::=
string
value ::=
literal
Supplement
discoveryType
specifies the database discovery service type,ShardingSphere
has built-in support forMySQL.MGR
;
Example
- Alter database discovery rule
ALTER DB_DISCOVERY RULE db_discovery_group_0 (
STORAGE_UNITS(ds_0, ds_1, ds_2),
TYPE(NAME='MySQL.MGR',PROPERTIES('group-name'='92504d5b-6dec')),
HEARTBEAT(PROPERTIES('keep-alive-cron'='0/5 * * * * ?'))
);
Reserved word
ALTER
, DB_DISCOVERY
, RULE
, STORAGE_UNITS
, TYPE
, NAME
, PROPERTIES
, HEARTBEAT
Related links
当前内容版权归 ShardingSphere 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 ShardingSphere .