在写程序的时候更新一个对象的时候出现假死情况等了半天出现这个错误:
java.sql.SQLException: ORA-00028: your session has been killed
ORA-00028: your session has been killed
查看语句
SELECT a_s.owner,
a_s.object_name,
a_s.object_type,
VN.SID,
VN.SERIAL#,
VS.SPID "OS_PID",
VN.PROCESS "CLIENT_PID",
VN.USERNAME,
VN.OSUSER,
VN.MACHINE "HOSTNAME",
VN.TERMINAL,
VN.PROGRAM,
TO_CHAR(VN.LOGON_TIME, 'YYYY-MM-DD HH24:MI:SS') "LOGIN_TIME",
'alter system kill session ''' || vn.sid || ',' || vn.serial# ||
''';' "ORACKE_KILL",
'kill -9 ' || VS.SPID "OS_KILL"
FROM ALL_OBJECTS A_S, V$LOCKED_OBJECT V_T, V$SESSION VN, V$PROCESS VS
WHERE A_S.OBJECT_ID = V_T.OBJECT_ID
AND V_T.SESSION_ID = VN.SID
AND VS.ADDR = VN.PADDR
AND VN.USERNAME NOT IN ('SYSMAN', 'SYS');
查看语句
select a.STATUS, a.username, a.sid, a.SERIAL#, b.SQL_TEXT, b.SQL_FULLTEXT
from v$session a, v$sqlarea b
where a.sql_address = b.address;
结束语句
alter system kill session 'sid,SERIAL#';
应该是我更新的时候,出错了我没有回滚事务,事务也没结束造成的。