v$rollstat 에서 상태가 "PENDING OFFLINE" 가 존재할 때
즐거운 샤핑 http://www.shapping.co.kr
Run the following query, which will return the Rollback Segment Number, name of the rollback segment, status of the rollback segment, undo tablespace name, address of transaction state object, session identifier, session serial number which uniquely identifies a session's objects, username, program, machine id and operating system client user name.
from v$rollstat
where STATUS = 'PENDING OFFLINE';
SELECT a.usn,
a.name,
b.status,
c.tablespace_name,
d.addr,
e.sid,
e.serial#,
e.username,
e.program,
e.machine,
e.osuser
FROM v$rollname a,
v$rollstat b,
dba_rollback_segs c,
v$transaction d,
v$session e
WHERE a.usn=b.usn
AND a.name=c.segment_name
AND a.usn=d.xidusn
AND d.addr=e.taddr
AND b.status='PENDING OFFLINE';
Compare the XIDUSN and ADDR returned by the v$transaction with the USN and ADDR returned by the above query. You will find the corresponding rollback segment details used for the transaction which is still active.
From the above query we can get the program, user and the machine details, so we can contact the specific users who have the rollback segments locked, to either commit or rollback the transaction. Once the transaction is commited or rolled back the alert log will no more be flooded with the errors.
The other option would be to kill the session that is holding the lock over the rollback segment. The above query also returns the sid# and the serial #. We can kill the session using the following statement:
SQL> ALTER SYSTEM KILL SESSION '<sid#>, <serial#>';
'Oracle > Database' 카테고리의 다른 글
How to Find which Session is Holding a Particular Library Cache Lock (0) | 2013.11.27 |
---|---|
[Windows] 일정 시간 이전의 파일 자동 삭제 Script (0) | 2013.04.11 |
대구 지역 Oracle DBA 경력자 모십니다. (0) | 2013.01.08 |
SQL 쿼리문에서 특수문자 검색 (0) | 2012.10.04 |
오라클DB “5시간이면 해킹“ (0) | 2012.09.26 |
PL/SQL Developer 에서 View Spec & Body 가 정상적으로 보이지 않을 때 (1) | 2012.01.05 |
utl_smtp 를 이용한 첨부파일 메일 전송 (0) | 2011.10.21 |
Windows 64bits OS 에 32bits ODBC 구성 (1) | 2010.09.03 |
(NT) Oracle DB → MS-SQL ODBC 연결 (4) | 2010.08.20 |
Windows 환경에서 alert.log 를 UNIX 환경에서 처럼 tail 로 보고 싶다면? (0) | 2010.08.05 |