对于表被锁起的操作:
查询:
[code] SELECT A.OWNER,
A.OBJECT_NAME,
B.XIDUSN,
B.XIDSLOT,
B.XIDSQN,
B.SESSION_ID,
B.ORACLE_USERNAME,
B.OS_USER_NAME,
B.PROCESS,
B.LOCKED_MODE,
C.MACHINE,
C.STATUS,
C.SERVER,
C.SID,
C.SERIAL#,
C.PROGRAM
FROM ALL_OBJECTS A, V$LOCKED_OBJECT B, v$SESSION C
WHERE (A.OBJECT_ID = B.OBJECT_ID)
AND (B.PROCESS = C.PROCESS)
and b.SESSION_ID=c.SID
ORDER BY 1, 2[/code]根据OBJECT_NAME找到对应的表,对应的'sid,和serial#
执行下面的SQL
杀掉:[code]alter system kill session 'sid, serial#' [/code]
查询:
[code] SELECT A.OWNER,
A.OBJECT_NAME,
B.XIDUSN,
B.XIDSLOT,
B.XIDSQN,
B.SESSION_ID,
B.ORACLE_USERNAME,
B.OS_USER_NAME,
B.PROCESS,
B.LOCKED_MODE,
C.MACHINE,
C.STATUS,
C.SERVER,
C.SID,
C.SERIAL#,
C.PROGRAM
FROM ALL_OBJECTS A, V$LOCKED_OBJECT B, v$SESSION C
WHERE (A.OBJECT_ID = B.OBJECT_ID)
AND (B.PROCESS = C.PROCESS)
and b.SESSION_ID=c.SID
ORDER BY 1, 2[/code]根据OBJECT_NAME找到对应的表,对应的'sid,和serial#
执行下面的SQL
杀掉:[code]alter system kill session 'sid, serial#' [/code]