[Oracle報錯處理]ORA-00031: session marked for kill
一些ORACLE中的程式被殺掉後,狀態被置為"killed",但是鎖定的資源很長時間不釋放,有時實在沒辦法,只好重啟資料庫。現在提供一種方法解決這種問題,那就是在ORACLE中殺不掉的,在OS一級再殺。
1.下面的語句用來查詢哪些物件被鎖:
select object_name,machine,s.sid,s.serial#
from v$locked_object l,dba_objects o ,v$session s
where l.object_id = o.object_id and l.session_id=s.sid;
2.下面的語句用來殺死一個程式:
alter system kill session '24,111'; (其中24,111分別是上面查詢出的sid,serial#)
【注】以上兩步,可以透過Oracle的管理控制檯來執行。
3.如果利用上面的命令殺死一個程式後,程式狀態被置為"killed",但是鎖定的資源很長時間沒有被釋放,那麼可以在os一級再殺死相應的程式(執行緒),首先執行下面的語句獲得程式(執行緒)號:
select spid, osuser, s.program
from v$session s,v$process p
where s.paddr=p.addr and s.sid=24 (24是上面的sid)
4.在OS上殺死這個程式(執行緒):
1)在unix上,用root身份執行命令:
#kill -9 12345(即第3步查詢出的spid)
2)在windows(unix也適用)用orakill殺死執行緒,orakill是oracle提供的一個可執行命令,語法為:
orakill sid thread
其中:
sid:表示要殺死的程式屬於的例項名
thread:是要殺掉的執行緒號,即第3步查詢出的spid。
例:c:>orakill orcl 12345
ORA-00031: session marked for kill
Cause: The session specified in an ALTER SYSTEM KILL SESSION command cannot be killed immediately (because it is rolling back or blocked on a network operation), but it has been marked for kill. This means it will be killed as soon as possible after its current uninterruptible operation is done.
Action: No action is required for the session to be killed, but further executions of the ALTER SYSTEM KILL SESSION command on this session may cause the session to be killed sooner.
select t.object_name,t.argument_name,t.data_type,t.in_out from all_arguments t where t.owner='SATGE' and t.object_name='SP_TB_SYS_DROP_PART_CFG';
kill -9 12345
來源:http://www.cnblogs.com/songdavid/articles/2223869.html
1.下面的語句用來查詢哪些物件被鎖:
select object_name,machine,s.sid,s.serial#
from v$locked_object l,dba_objects o ,v$session s
where l.object_id = o.object_id and l.session_id=s.sid;
2.下面的語句用來殺死一個程式:
alter system kill session '24,111'; (其中24,111分別是上面查詢出的sid,serial#)
【注】以上兩步,可以透過Oracle的管理控制檯來執行。
3.如果利用上面的命令殺死一個程式後,程式狀態被置為"killed",但是鎖定的資源很長時間沒有被釋放,那麼可以在os一級再殺死相應的程式(執行緒),首先執行下面的語句獲得程式(執行緒)號:
select spid, osuser, s.program
from v$session s,v$process p
where s.paddr=p.addr and s.sid=24 (24是上面的sid)
4.在OS上殺死這個程式(執行緒):
1)在unix上,用root身份執行命令:
#kill -9 12345(即第3步查詢出的spid)
2)在windows(unix也適用)用orakill殺死執行緒,orakill是oracle提供的一個可執行命令,語法為:
orakill sid thread
其中:
sid:表示要殺死的程式屬於的例項名
thread:是要殺掉的執行緒號,即第3步查詢出的spid。
例:c:>orakill orcl 12345
ORA-00031: session marked for kill
Cause: The session specified in an ALTER SYSTEM KILL SESSION command cannot be killed immediately (because it is rolling back or blocked on a network operation), but it has been marked for kill. This means it will be killed as soon as possible after its current uninterruptible operation is done.
Action: No action is required for the session to be killed, but further executions of the ALTER SYSTEM KILL SESSION command on this session may cause the session to be killed sooner.
select t.object_name,t.argument_name,t.data_type,t.in_out from all_arguments t where t.owner='SATGE' and t.object_name='SP_TB_SYS_DROP_PART_CFG';
kill -9 12345
來源:http://www.cnblogs.com/songdavid/articles/2223869.html
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29734436/viewspace-2144651/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- ora-00031:session marked for kill處理oracle中殺不掉的鎖SessionOracle
- Alter system kill session and ORA-00031: session marked for killSession
- ORA-00031:session marked for kill處理oracle中殺不掉鎖的程式SessionOracle
- kill session遇到ORA-00031錯誤Session
- ORA-00031:session marked for kill(標記要終止的會話)解決方法Session會話
- 要 kill session 例子,session多,報錯如下Session
- Oracle kill sessionOracleSession
- 【kill session】Oracle 徹底 kill session(轉載)SessionOracle
- Oracle kill session scriptOracleSession
- oracle_kill_sessionOracleSession
- Oracle中Kill sessionOracleSession
- Oracle批量kill sessionOracleSession
- windows下處理kill session不被釋放的鎖WindowsSession
- Oracle 徹底 kill sessionOracleSession
- Oracle中Kill session [轉]OracleSession
- 【會話】Oracle kill session系列會話OracleSession
- Oracle中Kill session的研究OracleSession
- oracle 資料庫鎖表處理 ORA-00031Oracle資料庫
- Oracle中Kill session的研究 for oracle -- 轉OracleSession
- 大話Oracle中的kill sessionOracleSession
- kill sessionSession
- 處理Oracle Session中的鎖OracleSession
- Oracle的Ora-00031 錯誤Oracle
- Oracle kill session相關問題(上)OracleSession
- Oracle kill session相關問題(下)OracleSession
- Oracle plsql session間通訊處理OracleSQLSession
- awk -- kill sessionSession
- Oracle 12c ORA-29548 報錯處理Oracle
- Table '.\mysql\proc' is marked as crashed and should be repaired 報錯MySqlAI
- Extjs報錯處理JS
- DG報錯的處理
- errpt報錯處理
- oracle ORA-01940 報錯的處理方法Oracle
- oracle 9.2.0.7 + hp_unix exp匯出報錯處理Oracle
- mysql批次kill sessionMySqlSession
- alter system kill sessionSession
- KILL SESSION 相關Session
- Gulp壓縮報錯處理