BACKRUSH  À¯´Ð½º¸í·É  ´ÙÀ½  ÀÚ·á½Ç  Ascii Table   ¿ø°ÝÁ¢¼Ó  ´Þ·Â,½Ã°£   ÇÁ·Î¼¼½º   ½©
ÁöÇÏö³ë¼±   RFC¹®¼­   SUN FAQ   SUN FAQ1   C¸Þ´º¾ó   PHP¸Þ´º¾ó   ³Ê±¸¸®   ¾Æ½ºÅ°¿ùµå ¾ÆÀÌÇǼ­Ä¡

±Û¾´ÀÌ: °³¶óŬ ¿À¶óŬ disk I/Oº¹±¸ Á¶È¸¼ö: 7677


* ¸ñÇ¥:
- CONTROL FILE º¹¿øÈÄ DB Á¤»ó °¡µ¿
- »ç¿ëÀÚ µ¥ÀÌÅÍ ÆÄÀÏ º¹¿ø
- ·Î±×¸É¹ö Àç»ý¼º

* ½Ã½ºÅÛ »óȲ
- 2°³ÀÇ µð½ºÅ©¸¦ »ç¿ëÁßÀε¥ 1°³ÀÇ µð½ºÅ©¿¡¼­ I/O ¿¡·¯°¡ ¹ß»ý
- ¹®Á¦´Â ¿¡·¯°¡ ¹ß»ýÇÑ µð½ºÅ©¿¡ user datafile °ú control file, ±×¸®°í redo logfile ÀÌ Á¸Àç
- ´ÙÇàÀÌ ÇöÀç oracle Àº archive mode À̸ç ÇÏ·ç¿¡ Çѹø¾¿ hot backup À» µ¹¸²
- control file °ú redo logfile Àº °¢°¢ 4°³, 2°³(log member) ·Î ´ÙÁßÈ­ µÇ¾î ¿î¿µÁßÀÓ

* Àå¾Ö º¹±¸ °úÁ¤
1. control file ÀÌ ÀÖ´Â µð½ºÅ©¿¡ Àå¾Ö°¡ ¹ß»ýÇ߱⠶§¹®¿¡ checkpoint °¡ ÀϾ °æ¿ì db °¡ down µÇ±â ¶§¹®¿¡ ¸ÕÀú control file º¹±¸¸¦ ¿ì¼±½ÃÇÔ

2. ´ÙÇàÀÌ control file ÀÌ ´ÙÁßÈ­ µÇ¾î Àֱ⶧¹®¿¡ db ¸¦ shutdown ÈÄ Á¤»óÀûÀÎ control file À» º¹»çÇؼ­ º¹¿ø

SQL> shutdown immediate;
ORA-00210: cannot open the specified controlfile
ORA-00202: controlfile: '/backup/ORCL/control04.ctl'
ORA-27041: unable to open file
Linux Error: 2: No such file or directory
Additional information: 3

[oracle@dbtest1 backup]$ cp /db/oradata/ORCL/control01.ctl /backup/ORCL/control04.ctl


SQL> startup

ORACLE instance started.
Total System Global Area 236000476 bytes
Fixed Size 451804 bytes
Variable Size 201326592 bytes
Database Buffers 33554432 bytes
Redo Buffers 667648 bytes
Database mounted.
Database opened.


3. db °¡ Á¤»óÀûÀ¸·Î ½ÇÇàµÇ¾úÀ¸³ª »ç¿ëÀÚ tablespace °¡ µð½ºÅ© Àå¾Ö·Î datafile ÀÌ Á¸ÀçÇÏÁö ¾ÊÀ¸¹Ç·Î offline µÊ.
¾Æ·¡¿Í °°ÀÌ »óŸ¦ È®ÀÎÈÄ hot backup ¶Ç´Â ´ÝÈù ¹é¾÷ ¹ÞÀº µ¥ÀÌÅÍ ÆÄÀÏ°ú ¹é¾÷ µÈ ÀÌÈÄÀÇ archive logfile À» ¸ðµÎ º¹¿øÈÄ recover tablespace ¸í·ÉÀ¸·Î º¹¿ø.
¸ðµÎ º¹¿øÀÌ ¿Ï·á µÇ¾úÀ¸¸é online À¸·Î Àüȯ
´Ü À§ÀÇ °úÁ¤Àº ¸ðµÎ online »óÅ¿¡¼­ °¡´É

SQL>select h.tablespace_name, d.name, h.error, d.status, h.status from v$datafile d, v$datafile_header h where d.file#=h.file#

TABLESPACE_NAME NAME ERROR STATUS STATUS
-------------------------------------------------------- -------------- ------- -------
SYSTEM /db/oradata/ORCL/system01.dbf SYSTEM ONLINE
UNDOTBS1 /db/oradata/ORCL/undotbs01.dbf ONLINE ONLINE
CWMLITE /db/oradata/ORCL/cwmlite01.dbf ONLINE ONLINE
DRSYS /db/oradata/ORCL/drsys01.dbf ONLINE ONLINE
EXAMPLE /db/oradata/ORCL/example01.dbf ONLINE ONLINE
INDX /db/oradata/ORCL/indx01.dbf ONLINE ONLINE
ODM /db/oradata/ORCL/odm01.dbf ONLINE ONLINE
TOOLS /db/oradata/ORCL/tools01.dbf ONLINE ONLINE
USERS /db/oradata/ORCL/users01.dbf ONLINE ONLINE
XDB /db/oradata/ORCL/xdb01.dbf ONLINE ONLINE
EXAMPLE /db/oradata/ORCL/example02.dbf ONLINE ONLINE

TABLESPACE_NAME NAME ERROR STATUS STATUS
------------------ -------------------------------------- ------- ---------------------------------------------
SALE_DATA_TS /backup/df1.dbf FILE NOT FOUND RECOVER OFFLINE
SALE_DATA_TS /backup/df2.dbf FILE NOT FOUND RECOVER OFFLINE
SALE_DATA_TS /backup/df3.dbf FILE NOT FOUND RECOVER OFFLINE



SQL> recover tablespace SALE_DATA_TS;
Media recovery complete.

SQL> alter tablespace SALE_DATA_TS online;

Tablespace altered.


SQL>select h.tablespace_name, d.name, h.error, d.status, h.status from v$datafile d, v$datafile_header h where d.file#=h.file#

TABLESPACE_NAME NAME ERROR STATUS STATUS
-------------------------------------------------------- -------------- ------- -------
SYSTEM /db/oradata/ORCL/system01.dbf SYSTEM ONLINE
UNDOTBS1 /db/oradata/ORCL/undotbs01.dbf ONLINE ONLINE
CWMLITE /db/oradata/ORCL/cwmlite01.dbf ONLINE ONLINE
DRSYS /db/oradata/ORCL/drsys01.dbf ONLINE ONLINE
EXAMPLE /db/oradata/ORCL/example01.dbf ONLINE ONLINE
INDX /db/oradata/ORCL/indx01.dbf ONLINE ONLINE
ODM /db/oradata/ORCL/odm01.dbf ONLINE ONLINE
TOOLS /db/oradata/ORCL/tools01.dbf ONLINE ONLINE
USERS /db/oradata/ORCL/users01.dbf ONLINE ONLINE
XDB /db/oradata/ORCL/xdb01.dbf ONLINE ONLINE
EXAMPLE /db/oradata/ORCL/example02.dbf ONLINE ONLINE



TABLESPACE_NAME NAME ERROR STATUS STATUS
------------------ -------------------------------------- ------- -------
/backup/df1.dbf ONLINE ONLINE
/backup/df2.dbf ONLINE ONLINE
/backup/df3.dbf ONLINE ONLINE


4. Àå¾Ö°¡ ¹ß»ýÇÑ µð½ºÅ©¿¡ ·Î±×±×·ìÀÇ ¸â¹öµéÀÌ À§Ä¡ÇÏ¿´±â¿¡ ·Î±×ÆÄÀÏ È®ÀÎÈÄ ·Î±×ÆÄÀÏÀ» Àç»ý¼ºÇØ¾ß ÇÔ
´Ü ÁÖÀÇ »çÇ×Àº CURRENT µÇ¾îÀÖ´Â log member ´Â drop ÀÌ µÇÁö ¾Ê±â¶§¹®¿¡ log switch ¸¦ ÀÏÀ¸Å² ÈÄ¿¡ drop ½ÃÄÑ¾ß ÇÔ

SQL> select * from v$logfile;

GROUP# STATUS TYPE MEMBER
---------- ------- ------- --------------------------------------------------
3 STALE ONLINE /db/oradata/ORCL/redo03.log
2 ONLINE /db/oradata/ORCL/redo02.log
1 ONLINE /db/oradata/ORCL/redo01.log
1 INVALID ONLINE /backup/ORCL/redo01_02.log
2 INVALID ONLINE /backup/ORCL/redo02_02.log
3 INVALID ONLINE /backup/ORCL/redo03_02.log

SQL> alter system switch logfile;

System altered.

SQL> /

System altered.

SQL> /

System altered.

SQL> /

System altered.

SQL> select * from v$logfile; // ·Î±×ÆÄÀÏÀÌ Á¸ÀçÇÏÁö ¾Ê±â¿¡ INVALID »óÅ°¡ µÊ

GROUP# STATUS TYPE MEMBER
---------- ------- ------- --------------------------------------------------
3 ONLINE /db/oradata/ORCL/redo03.log
2 ONLINE /db/oradata/ORCL/redo02.log
1 ONLINE /db/oradata/ORCL/redo01.log
1 INVALID ONLINE /backup/ORCL/redo01_02.log
2 INVALID ONLINE /backup/ORCL/redo02_02.log
3 INVALID ONLINE /backup/ORCL/redo03_02.log

6 rows selected.


SQL> select * from v$logfile;

GROUP# STATUS TYPE MEMBER
---------- ------- ------- --------------------------------------------------
3 ONLINE /db/oradata/ORCL/redo03.log
2 ONLINE /db/oradata/ORCL/redo02.log
1 ONLINE /db/oradata/ORCL/redo01.log
1 INVALID ONLINE /backup/ORCL/redo01_02.log
2 INVALID ONLINE /backup/ORCL/redo02_02.log
3 INVALID ONLINE /backup/ORCL/redo03_02.log

6 rows selected.

SQL> select * from v$log;

GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS FIRST_CHANGE# FIRST_TIM
---------- ---------- ---------- ---------- ---------- --- ---------------- ------------- ---------
1 1 35 104857600 2 YES INACTIVE 1004167 03-OCT-06
2 1 36 104857600 2 NO CURRENT 1004169 03-OCT-06
3 1 34 104857600 2 YES INACTIVE 1004164 03-OCT-06

SQL> alter database drop logfile member '/backup/ORCL/redo01_02.log';

Database altered.

SQL> alter database drop logfile member '/backup/ORCL/redo03_02.log';

Database altered.

SQL> select * from v$logfile;

GROUP# STATUS TYPE MEMBER
---------- ------- ------- --------------------------------------------------
3 ONLINE /db/oradata/ORCL/redo03.log
2 ONLINE /db/oradata/ORCL/redo02.log
1 ONLINE /db/oradata/ORCL/redo01.log
2 INVALID ONLINE /backup/ORCL/redo02_02.log

SQL> alter database drop logfile member '/backup/ORCL/redo02_02.log';
alter database drop logfile member '/backup/ORCL/redo02_02.log'
*
ERROR at line 1:
ORA-01609: log 2 is the current log for thread 1 - cannot drop members
ORA-00312: online log 2 thread 1: '/db/oradata/ORCL/redo02.log'
ORA-00312: online log 2 thread 1: '/backup/ORCL/redo02_02.log'


// ÇöÀç current logfile À̱⶧¹®¿¡ drop ÀÌ ¾ÈµÊ
¾Æ·¡¿Í °°ÀÌ log switch ¸¦ ÀÏÀ¸Å²ÈÄ¿¡ drop Çϸé Á¤»óÀûÀ¸·Î drop µÊ

SQL> alter system switch logfile;

System altered.

SQL> select * from v$log;

GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS FIRST_CHANGE# FIRST_TIM
---------- ---------- ---------- ---------- ---------- --- ---------------- ------------- ---------
1 1 35 104857600 1 YES INACTIVE 1004167 03-OCT-06
2 1 36 104857600 2 YES ACTIVE 1004169 03-OCT-06
3 1 37 104857600 1 NO CURRENT 1004460 03-OCT-06

SQL> alter database drop logfile member '/backup/ORCL/redo02_02.log';

Database altered.


SQL> select * from v$log;

GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS FIRST_CHANGE# FIRST_TIM
---------- ---------- ---------- ---------- ---------- --- ---------------- ------------- ---------
1 1 35 104857600 1 YES INACTIVE 1004167 03-OCT-06
2 1 36 104857600 1 YES ACTIVE 1004169 03-OCT-06
3 1 37 104857600 1 NO CURRENT 1004460 03-OCT-06


SQL> alter system switch logfile;

System altered.

SQL> alter database add logfile member '/backup/ORCL/redo01_02.log' to group 1;

Database altered.

SQL> alter database add logfile member '/backup/ORCL/redo02_02.log' to group 2;

Database altered.

SQL> alter database add logfile member '/backup/ORCL/redo03_02.log' to group 3;



Database altered.

SQL> select * from v$logfile;

GROUP# STATUS TYPE MEMBER
---------- ------- ------- --------------------------------------------------
3 ONLINE /db/oradata/ORCL/redo03.log
2 ONLINE /db/oradata/ORCL/redo02.log
1 ONLINE /db/oradata/ORCL/redo01.log
1 INVALID ONLINE /backup/ORCL/redo01_02.log
2 INVALID ONLINE /backup/ORCL/redo02_02.log
3 INVALID ONLINE /backup/ORCL/redo03_02.log

6 rows selected.

SQL> alter system switch logfile;

System altered.

SQL> /

System altered.

SQL> /
/
select * from v$logfile
System altered.

SQL>
System altered.

SQL> ;

GROUP# STATUS TYPE MEMBER
---------- ------- ------- --------------------------------------------------
3 ONLINE /db/oradata/ORCL/redo03.log
2 ONLINE /db/oradata/ORCL/redo02.log
1 ONLINE /db/oradata/ORCL/redo01.log
1 ONLINE /backup/ORCL/redo01_02.log
2 ONLINE /backup/ORCL/redo02_02.log
3 ONLINE /backup/ORCL/redo03_02.log

6 rows selected.

°ü·Ã±Û : ¾øÀ½ ±Û¾´½Ã°£ : 2006/11/30 12:55 from 218.38.35.251

  ¿À¶óŬ Ç÷¡½¬¹é±â´ÉÈ°¿ë ¸ñ·Ïº¸±â »õ±Û ¾²±â Áö¿ì±â ÀÀ´ä±Û ¾²±â ±Û ¼öÁ¤ ¿À¶óŬ opatch È°¿ë ÆÐÄ¡  
BACKRUSH  À¯´Ð½º¸í·É  ´ÙÀ½  ÀÚ·á½Ç  Ascii Table   ¿ø°ÝÁ¢¼Ó  ´Þ·Â,½Ã°£   ÇÁ·Î¼¼½º   ½©
ÁöÇÏö³ë¼±   RFC¹®¼­   SUN FAQ   SUN FAQ1   C¸Þ´º¾ó   PHP¸Þ´º¾ó   ³Ê±¸¸®   ¾Æ½ºÅ°¿ùµå ¾ÆÀÌÇǼ­Ä¡