PROCESS

ORACLE FILE I/O 

 Data files

Log

Archive 

Control 

CKPT

read/write

 

 

 

 DBWn

write

 

 

 

 LGWR

 

write

 

read/write 

 ARCn

 

read

write

read/write

 SERVER

read/write

read

write

read/write

 

Posted by neo-orcl
,

테스트환경에서 우연찮게 발견한 현상이다.

OS: centos 5.6
oracle ver: 10.2.0.5

창을 두개 뜨우고 하나는 rman target / 로 접속했다.
다른 하나는 sqlplus 에서 shutdown immediate 를 실행했다.
아무리 시간이 지나도 shutdown이 되지 않는다.
얼럿로그에 다음과 같은 내용이 있다.

Shutting down instance (immediate)
Fri Mar 15 16:02:59 KST 2013
Shutting down instance: further logons disabled
Fri Mar 15 16:02:59 KST 2013
Stopping background process QMNC
Fri Mar 15 16:02:59 KST 2013
Stopping background process CJQ0
Fri Mar 15 16:03:01 KST 2013
Stopping background process MMNL
Fri Mar 15 16:03:02 KST 2013
Stopping background process MMON
License high water mark = 4
Fri Mar 15 16:03:03 KST 2013
Process OS id : 28767 alive after kill
Errors in file /oracle/admin/testdb/udump/testdb_ora_28754.trc
Fri Mar 15 16:03:06 KST 2013
Waiting for Job queue slaves to complete
Fri Mar 15 16:03:06 KST 2013
Job queue slave processes stopped
All dispatchers and shared servers shutdown

28767 OS process ID로 검색해보았다.
[oracle@centos5 testdb]$ ps -ef | grep 28767
oracle   28844 27374  0 16:04 pts/3    00:00:00 grep 28767
안나온다. rman target / 로 접속한걸 확인해봤다.
[oracle@centos5 testdb]$ ps -ef | grep rman
oracle   28789 27154  0 16:02 pts/2    00:00:00 rman target /
oracle   28861 27374  0 16:05 pts/3    00:00:00 grep rman

나온다. 하지만 PID가 틀리다.
트레이스파일 확인해보니
*** 2013-03-15 16:08:54.984
Process diagnostic dump for oracle@centos5.6x64 (TNS V1-V3), OS id=28796,
pid: 23, proc_ser: 2, sid: 144, sess_ser: 14
-------------------------------------------------------------------------------
loadavg : 0.98 0.76 0.40
Memory (Avail / Total) = 89.61M / 1504.47M
Swap (Avail / Total) = 2306.11M /  2306.20M
F S UID        PID  PPID  C PRI  NI ADDR SZ WCHAN  STIME TTY          TIME CMD
0 Z oracle   28796 28789  0  78   0 -     0 exit   16:02 ?        00:00:00 [oracle] <defunct>
 
계속 이 프로세스를 죽이려고 시도하고 있다.

해결방법: 결국 아래 두개 모두 같은 결과긴 하다.
1. rman 세션을 exit로 정상 종료한다.
2. ppid인 28789를 죽인다.

Posted by neo-orcl
,

ORA-01545: rollback segment 'string' specified not available

01545, 00000, "rollback segment '%s' specified not available"
// *Cause: Either:
//         1) An attempt was made to bring a rollback segment online that is
//            unavailable during startup; for example, the rollback segment
//            is in an offline tablespace.
//         2) An attempt was made to bring a rollback segment online that is
//            already online.  This is because the rollback segment is
//            specified twice in the ROLLBACK_SEGMENTS parameter in the
//            initialization parameter file or the rollback segment is already
//            online by another instance.
//         3) An attempt was made to drop a rollback segment that is
//            currently online.
//         4) An attempt was made to alter a rollback segment that is
//            currently online to use unlimited extents.
//         5) An attempt was made to online a rollback segment that is
//            corrupted. This is because the rollback is specified in
//            _corrupted_rollback_segments parameter in initialization
//            parameter file.
// *Action: Either:
//         1) Make the rollback segment available; for example, bring an
//            offline tablespace online.
//         2) Remove the name from the ROLLBACK_SEGMENTS parameter if the name
//            is a duplicate or if another instance has already acquired the
//            rollback segment.
//         3) Bring the rollback segment offline first. This may involve
//            waiting for the active transactions to finish, or, if the
//            rollback segment needs recovery, discover which errors are
//            holding up the rolling back of the transactions and take
//            appropriate actions.
//         4) Same as 3).
//         5) Remove the name from the _corrupted_rollback_segments parameter.

발생 OS: SunOS 5.7
Oracle db version: 8.2.7.4

1. 복구 후 DB startup 시 에러 나타남

SQL> recover database;
ORA-00283: recovery session canceled due to errors
ORA-00264: no recovery required
SQL> startup
ORACLE instance started.

Total System Global Area  919359164 bytes
Fixed Size                   102076 bytes
Variable Size             487653376 bytes
Database Buffers          429490176 bytes
Redo Buffers                2113536 bytes
Database mounted.
ORA-01092: ORACLE instance terminated. Disconnection forced

얼럿로그: ORA-01545: rollback segment 'RBS1' specified not available

2. init파일에서 rollback_segments 주석처리 후 open

SQL> startup
ORACLE instance started.

Total System Global Area  919359164 bytes
Fixed Size                   102076 bytes
Variable Size             487653376 bytes
Database Buffers          429490176 bytes
Redo Buffers                2113536 bytes
Database mounted.
ORA-00604: error occurred at recursive SQL level 1
ORA-00376: file 3 cannot be read at this time
ORA-01110: data file 3: '/oradata/rbs01.dbf'

3. v$recover_file 확인해서 파일별 복구 수행후 online

SQL> select * from v$recover_file;
SQL> recover datafile 8;
ORA-00279: change 377347436 generated at 03/06/2013 22:10:36 needed for thread 1
ORA-00289: suggestion : /oradata/archive/arch_1_37864.arc
ORA-00280: change 377347436 for thread 1 is in sequence #37864
Specify log: {<RET>=suggested | filename | AUTO | CANCEL}

SQL> alter database datafile 8 online;
Database altered.

4. rbs파일인 (여기선 3번) 3번파일 offline + recover + online 수행

SQL> alter database datafile 3 offline;
Database altered.

SQL> recover datafile 3;      
Media recovery complete.

SQL> alter database datafile 3 online;
Database altered.

5. db shutdown 후 init파일 rollback_segments 주석처리 제거하여 startup 후 정상 확인

※해당 상황은 필요 아카이브 로그가 전부 있는 상황이다.

Posted by neo-orcl
,