ALTER DB_DISCOVERY RULE

描述

ALTER DB_DISCOVERY RULE 语法用于修改数据库发现规则

语法定义

语法 铁路图

  1. AlterDatabaseDiscoveryRule ::=
  2. 'ALTER' 'DB_DISCOVERY' 'RULE' databaseDiscoveryDefinition (',' databaseDiscoveryDefinition)*
  3. databaseDiscoveryDefinition ::=
  4. ruleName '(' 'STORAGE_UNITS' '(' storageUnitName (',' storageUnitName)* ')' ',' 'TYPE' '(' 'NAME' '=' typeName (',' propertiesDefinition)? ')' ',' 'HEARTBEAT' '(' propertiesDefinition ')' ')'
  5. propertiesDefinition ::=
  6. 'PROPERTIES' '(' key '=' value (',' key '=' value)* ')'
  7. ruleName ::=
  8. identifier
  9. storageUnitName ::=
  10. identifier
  11. typeName ::=
  12. identifier
  13. discoveryHeartbeatName ::=
  14. identifier
  15. key ::=
  16. string
  17. value ::=
  18. literal

补充说明

  • discoveryType 指定数据库发现服务类型,ShardingSphere 内置支持 MySQL.MGR

示例

  • 修改数据库发现规则
  1. ALTER DB_DISCOVERY RULE db_discovery_group_0 (
  2. STORAGE_UNITS(ds_0, ds_1, ds_2),
  3. TYPE(NAME='MySQL.MGR',PROPERTIES('group-name'='92504d5b-6dec')),
  4. HEARTBEAT(PROPERTIES('keep-alive-cron'='0/5 * * * * ?'))
  5. );

保留字

ALTERDB_DISCOVERYRULESTORAGE_UNITSTYPENAMEPROPERTIESHEARTBEAT

相关链接