obclient -hxx.xx.xx.xx -P2883 -uroot@sys#xxx -p’xxxxx’ -c -A oceanbase -e"select count(*) from gv$lock;"
ERROR 1146 (42S02) at line 1: Table ‘oceanbase.gv’ doesn’t exist
写巡检脚本,__all_rootservice_event_history 这些视图没有问题,这样写脚本的话,gv$这些视图要怎么才可以写如脚本里面?
obclient -hxx.xx.xx.xx -P2883 -uroot@sys#xxx -p’xxxxx’ -c -A oceanbase -e"select count(*) from gv$lock;"
ERROR 1146 (42S02) at line 1: Table ‘oceanbase.gv’ doesn’t exist
写巡检脚本,__all_rootservice_event_history 这些视图没有问题,这样写脚本的话,gv$这些视图要怎么才可以写如脚本里面?
换成单引号包起来就可以了
谢谢 成功了