首页 oracleoracle查看被锁表,以及oracle解锁表

oracle查看被锁表,以及oracle解锁表

mc 2022-01-10 03:32:05 0 298

1.查看锁表

select sess.sid,
       sess.serial#,
       lo.oracle_username,
       lo.os_user_name,
       ao.object_name,
       lo.locked_mode
  from v$locked_object lo, dba_objects ao, v$session sess
 where ao.object_id = lo.object_id
   and lo.session_id = sess.sid;

2.解锁被锁表

--SID+SERIAL#
alter system kill session '920,13653'; 
您可能对以下文章感兴趣
发表评论