select C.session_id sid, B.serial#, A.SQL_TEXT, B.USERNAME, C.OBJECT_ID, C.SESSION_ID, B.SERIAL#, C.ORACLE_USERNAME, C.OS_USER_NAME, C.Process, ‘alter system kill session ‘ || ‘‘‘‘ || C.Session_ID || ‘,‘ || B.SERIAL# || ‘‘‘‘ || ‘;‘ from v$sql A, v$session B, v$locked_object C where A.HASH_VALUE = B.SQL_HASH_VALUE and B.SID = C.Session_ID;
oracle解锁方法:
alter system kill session ‘633‘; –146为锁住的进程号,即spid
。。。