这个是我使用的查询表锁的sql,
select /*+DYNAMIC_SAMPLING(1)*/
concat('kill',c.svr_ip,'/',c.svr_ip,':2881/') as kill_sid,
b.database_name,b.table_name,a.svr_ip,
case when block = 0 then '持有锁会话' ELSE '等待锁会话' END AS block,
c.id,a.type,a.trans_id,a.id2,a.lmode,
a.CTIME / 1000000 as CTIME,c.info,c.command,c.time,c.total_time,c.user_client_ip,c.retry_cnt,c.retry_info,c.thread_id,c.trace_id
from gv$ob_locks a,cdb_ob_table_locations b,gv$ob_processlist c
where a.id1 = b.tablet_id and a.tenant_id = b.tenant_id and c.trans_id = a.trans_id and b.tenant_id = 1044 and b.role = 'LEADER' and id2 is not null;
或者是在ocp的自治服务上看。还有什么其他好的方法吗