1. SID, SERIAL# 찾기
SELECT A.SID, A.SERIAL#, B.TYPE, C.OBJECT_NAME
FROM V$SESSION A, V$LOCK B, DBA_OBJECTS C
WHERE A.SID=B.SID
AND B.ID1=C.OBJECT_ID
AND B.TYPE='TM'
AND C.OBJECT_NAME IN ('ITOC010');
>alter system kill session 'SID,SERIAL#' ;
-------------------------------------------------
2. OS 상에서 Process Kill
select substr(s.username,1,11) "ORACLE USER"
, p.pid "PROCESS ID"
, s.sid "SESSION ID"
, s.serial#
, osuser "OS USER"
, p.spid "PROC SPID"
, s.process "SESS SPID"
, s.lockwait "LOCK WAIT"
from v$process p , v$session s , v$access a
where a.sid=s.sid
and p.addr=s.paddr
and s.sid = '42' <------ SID
and s.username != 'SYS' ( system 유저 포함시)
> kill -9 spid
SELECT A.SID, A.SERIAL#, B.TYPE, C.OBJECT_NAME
FROM V$SESSION A, V$LOCK B, DBA_OBJECTS C
WHERE A.SID=B.SID
AND B.ID1=C.OBJECT_ID
AND B.TYPE='TM'
AND C.OBJECT_NAME IN ('ITOC010');
>alter system kill session 'SID,SERIAL#' ;
-------------------------------------------------
2. OS 상에서 Process Kill
select substr(s.username,1,11) "ORACLE USER"
, p.pid "PROCESS ID"
, s.sid "SESSION ID"
, s.serial#
, osuser "OS USER"
, p.spid "PROC SPID"
, s.process "SESS SPID"
, s.lockwait "LOCK WAIT"
from v$process p , v$session s , v$access a
where a.sid=s.sid
and p.addr=s.paddr
and s.sid = '42' <------ SID
and s.username != 'SYS' ( system 유저 포함시)
> kill -9 spid
'DataBase > Oracle' 카테고리의 다른 글
인덱스를 타지 않는 SQL (0) | 2008.04.28 |
---|---|
ORACLE TABLE SPACE 사용량 확인 쿼리및 조취법 (0) | 2008.04.28 |
데이터사전 정보조회 (0) | 2008.04.28 |
Merge 사용하기 (0) | 2008.04.28 |
실행계획 해석하기(1) (0) | 2008.04.28 |