为方便用户使用和维护DRDS,DRDS提供自己特有的管理命令语句。
管理命令语句是统一由udal开头的特殊SQL语句,DRDS特有的管理命令详见下表:
Show Command |
Description |
UDAL SHOW HELP |
show udal commands |
UDAL SHOW VERSION |
Report DBProxy Server version |
UDAL SHOW SERVER |
Report server status |
UDAL SHOW DATASOURCE [ WHERE DATANODE = 'datanode' ] |
Report dataSources |
UDAL SHOW THREADPOOL |
Report threadPool status |
UDAL SHOW PROCESSOR |
Report processor status |
UDAL SHOW COMMAND |
Report commands status |
UDAL SHOW CACHE |
Report system cache usage |
UDAL SHOW BACKEND [ COUNT ] |
Report backend connection status |
UDAL SHOW FRONTEND [ COUNT ] |
Report front connection status |
UDAL SHOW SESSION |
show session info with connection binding |
UDAL SHOW HEARTBEAT |
Report heartbeat status |
UDAL SHOW SEQUENCE [ WHERE SCHEMA = 'sequence' AND SEQUENCE = 'schema' ] |
sequenceServer sequenceInfo monitor |
UDAL SHOW CONFIG WRITEHOST [ WHERE DATANODE IN ( 'datanode_list' , ... ) ] |
udal show writehost info |
UDAL SHOW CONFIG TABLENODE [ WHERE TABLENAME IN ( 'tablename_list' , ... ) ] |
udal show tableNode info |
UDAL SHOW CONFIG DATANODE [WHERE SCHEMA = 'schema'] |
Report dataNodes |
UDAL SHOW CONFIG GRANTS WHERE USER = 'user' |
Report user's privileges |
UDAL SHOW SEQUENCE [ SCHEMA ] |
sequenceServer sequenceInfo monitor |
UDAL SHOW LOCKS |
show locks for current dbproxy cluster |
UDAL SHOW METRIC SQL { SLOW / TPS} |
show statistic of sql |
UDAL SHOW CONFIG METRIC |
show config of metric |
UDAL SHOW TOP 10 |
udal show top 10 [ALL / SLOW / BROADCAST] |
Set Command |
Description |
UDAL SET MONITOR 'status' |
set monitor status |
UDAL SET SEQUENCE VALUE = 'value' WHERE SCHEMA = 'schema' AND SEQUENCE = 'sequence' |
set sequence value |
Dt Command |
Description |
UDAL DT SHOW COMPENSATION WHERE COMPENSATION_ID [= or LIKE] XXX |
|
UDAL DT SHOW LOCK WHERE COMPENSATION_ID [= or LIKE] XXX |
|
UDAL DT SHOW BKLOCK WHERE COMPENSATION_ID [= or LIKE] XXX |
|
UDAL DT DELETE COMPENSATION WHERE COMPENSATION_ID [= or LIKE] XXX |
|
UDAL DT DELETE LOCK WHERE COMPENSATION_ID [= or LIKE] XXX |
|
UDAL DT DELETE BKLOCK WHERE COMPENSATION_ID [= or LIKE] XXX |
|
Common Command |
Description |
UDAL KILL CONNECTION 'connection_ids' ... |
kill connection |
UDAL STOP HEARTBEAT 'datanodes' ... FOR 'period' |
stop heartbeat for a time |
UDAL SWITCH DATASOURCE 'datanodes' ... [ TO 'index' ] |
switch datasource |
UDAL VALIDATE SEQUENCE WHERE SCHEMA = 'schema' AND SEQUENCE = 'sequence' |
validate sequence |
UDAL LOCK DATANODE '?' [WRITE/READ] |
lock datanode for dbproxy cluster |
UDAL LOCK TABLE '?' [WRITE/READ] |
lock table for dbproxy cluster |
UDAL UNLOCK TABLE '?' |
unlock table for dbproxy cluster |
UDAL UNLOCK DATANODE '?' |
unlock datanode for dbproxy cluster |