oracle 查询锁表
SELECT
o.object_name,
s.sid,
s.serial#,
p.spid,
s.username,
s.program
FROM
v l o c k e d o b j e c t l J O I N d b a o b j e c t s o O N l . o b j e c t i d = o . o b j e c t i d J O I N v locked_object l JOIN dba_objects o ON l.object_id = o.object_id JOIN v lockedobjectlJOINdbaobjectsoONl.objectid=o.objectidJOINvsession s ON l.session_id = s.sid
LEFT JOIN v$process p ON p.addr = s.paddr;
如果有数据 看数据是那个服务的,重启下那个服务即可;如果能定位问题代码 可以看下代码为什么产生锁表