PLSQL?執(zhí)行下面語(yǔ)句
SELECT s.username,
decode(l.type, 'TM', 'TABLE LOCK', 'TX', 'ROW LOCK', NULL) LOCK_LEVEL,
o.owner,
o.object_name,
o.object_type,
s.sid,
s.serial#,
s.terminal,
s.machine,
s.program,
s.osuser
FROM v$session s, v$lock l, dba_objects o
WHERE l.sid = s.sid
AND l.id1 = o.object_id(+)
AND s.username is NOT NULL
找出來(lái)自己被鎖的表名
object_name字段中萝嘁,找到自己的機(jī)器
找到SID,SERIAL#字段放入下面語(yǔ)句運(yùn)行即可解鎖
alter system kill session 'SID,SERIAL#';
出現(xiàn)刪錯(cuò)表數(shù)據(jù)的情況使用下面語(yǔ)句回滾到特定時(shí)間
select * from sys_info as of timestamp to_Date('2014-04-08 15:28:00', 'yyyy-mm-dd hh24:mi:ss')