오라클 Session Kill

Oracle 2008. 5. 29. 10:58 Posted by 한준_희아빠

LOCK 확인
SELECT * FROM V$LOCKED_OBJECT

세션확인
SELECT
SID, SERIAL#, USERNAME, STATUS
FROM V$SESSION

세션 KILL
ALTER SYSTEM KILL SESSION 'SID,serial number'

예제
ALTER SYSTEM KILL SESSION '41,2143'

세션이 안죽는 경우 아래와 같이 쿼리를 날려 unix pid 를 알아낸후
select p.spid,
p.terminal,
p.program,
p.background,
s.*
from v$process p,
v$session s
where p.addr = s.paddr

UNIX 인 경우
ps -ef || grep ora

-- pid 확인후
kill -9 pid

WINDOW 인 경우

orakill sid thread

예를들어
D:\oracle\ora81\bin>orakill ORA8I 1020

여기서
sid = the Oracle instance to target
thread = the thread id of the thread to kill

thread 는 아래 쿼리의 spid 임.
select
p.spid,
p.terminal,
p.program,
p.background,
s.*
from v$process p,
v$session s
where p.addr = s.paddr

'Oracle' 카테고리의 다른 글

Toad에서 한글 인식이 안되는 경우.  (0) 2009.03.31
oracle to_char정리  (0) 2008.09.11
oracle imp, exp 하는 방법  (0) 2007.12.13
DBLINK 사용시 ORA-02085 문제  (0) 2007.11.15
테이블 컬럼명 변경  (0) 2007.04.26