Oracle查询锁表和解锁

1.查询是否锁表

SELECT l.session_id sid, s.serial#, l.locked_mode,l.oracle_username,
  l.os_user_name,s.machine, s.terminal, o.object_name, s.logon_time
  FROM v$locked_object l, all_objects o, v$session s
  WHERE l.object_id = o.object_id
  AND l.session_id = s.sid
and oracle_username = '用户名' --用户名要大写
  ORDER BY sid, s.serial#

2.解锁

ALTER system KILL session 'SID,serial#'
上一篇:windows下git显示文件被修改,实际没有改动的问题解决办法


下一篇:得到当前堆栈信息的两种方式(Thread和Throwable)的纠结