时间:2021-07-01 10:21:17 帮助过:46人阅读
--查出所有被锁住的表 select b.owner TABLEOWNER, b.object_name TABLENAME, c.OSUSER LOCKBY, c.USERNAME LOGINID, c.sid SID, c.SERIAL# SERIAL from v$locked_object a,dba_objects b, v$session c where b.object_id = a.object_id AND a.SESSION_ID =c
--查出所有被锁住的表
select b.owner TABLEOWNER, b.object_name TABLENAME, c.OSUSER LOCKBY, c.USERNAME LOGINID, c.sid SID, c.SERIAL# SERIAL
from v$locked_object a,dba_objects b, v$session c
where b.object_id = a.object_id AND a.SESSION_ID =c.sid;
--通过SID, SERIAL解锁
alter system kill session 'SID,
SERIAL';
锁表
lock table BSZ1_W_DOT010_PB01T252_wk2 in exclusive mode;
conn sys/orcl AS SYSDBA
Alter user hr identified by hr account unlock;
alter user scott account unlock;