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

±Û¾´ÀÌ: ddd °³¶óŬ º¹±¸ Á¶È¸¼ö: 8356


µ¥ÀÌÅͺ£À̽º ¹é¾÷°ú º¹±¸Àü·« (2) - ¿À¶óŬÀÇ µ¥ÀÌÅͺ£À̽º º¹±¸

2. DATABASE º¹±¸

2.1 °³³ä

µ¥ÀÌÅͺ£À̽º¿¡ ÀÌ»óÀÌ »ý°Ü ½Ã½ºÅÛÀÇ Á¤»óÀÛµ¿ÀÌ ºÒ°¡´ÉÇÒ °æ¿ì ¹é¾÷ÇÑ ÀڷḦ ÀÌ¿ëÇÏ¿© Àå¾Ö¹ß»ý½ÃÁ¡±îÁöÀÇ µ¥ÀÌÅ͸¦ º¹±¸Çϰųª, ÀÏÁ¤ ½Ã°£À» ±âÁØÀ¸·Î ÇÏ¿© µ¥ÀÌÅͺ£À̽ºÀÇ ¿î¿ë½ÃÁ¡À» µ¹·Á³õÀ¸·Á ÇÏ´Â ÀÛ¾÷À» µ¥ÀÌÅͺ£À̽º º¹±¸¶ó ÇÑ´Ù. µ¥ÀÌÅͺ£À̽º º¹±¸¸¦ À§Çؼ­´Â ¾Æ·¡¿Í °°Àº ȯ°æÀÌ ¸¶·ÃµÇ¾î ÀÖ¾î¾ß ÇÑ´Ù.

2.2 º¹±¸¸¦ À§ÇÑ ÁÖº¯ ȯ°æ

µ¥ÀÌÅͺ£À̽º¸¦ º¹±¸Çϱâ À§Çؼ­´Â ¾Æ·¡¿Í °°Àº ÁÖº¯È¯°æÀÌ ¸¶·ÃµÇ¾î ÀÖ¾î¾ß ÇÑ´Ù.

°¡. Àå¾ÖÀÇ ¿øÀÎÀº ¹«¾ùÀÎÁö ¾Ë ¼ö Àִ ȯ°æ
- Àå¾ÖÀÇ ¿øÀÎÀº º¸Åë trace fileÀ̳ª ¿À¶óŬÀÇ alertSID.logÆÄÀÏ¿¡ ±â·ÏµÇ´Âµ¥ ÀÌ ÆÄÀÏÀ» ±Ù°Å·Î ÇÏ¿© Àå¾ÖÀÇ ¿øÀÎÀ» ÆľÇÇÒ ¼ö Àִ ȯ°æÀÌ µÇ¾î¾ß ÇÑ´Ù.

³ª. º¹±¸¸¦ À§ÇØ ±âÁ¸¿¡ ¹é¾÷µÈ ÀÚ·á°¡ Àִ°¡?
- Àå¾Ö À¯Çüº°·Î º¹±¸¹æ¹ýÀÌ ´Ù¸£°í º¹±¸ÇÏ°íÀÚ ÇÏ´Â ½ÃÁ¡±îÁö Á¤È®ÇÏ°Ô º¹±¸°¡ °¡´ÉÇϱâ À§ÇÑ ÇÊ¿äÇÑ ÆÄÀϵéÀÌ ¹é¾÷ÀÌ µÇ¾î ÀÖ¾î¾ß ÇÑ´Ù.

´Ù. ½Ã½ºÅÛÀÇ °¡µ¿À» Áß´ÜÇÒ ¼ö Àִ°¡?
- Àå¾Ö À¯Çüº°·Î ½Ã½ºÅÛÀ» °¡µ¿ÇÏÁö ¸øÇÏ°í »ç¿ëÀÚÀÇ Á¢¼ÓÅëÁ¦°¡ ºÒ°¡ÇÇÇÑ °æ¿ì Á¢±ÙÅëÁ¦´Â Àå¾ÖÁø´Ü ÈÄ Áï°¢ÀûÀ¸·Î ó¸® µÉ ¼ö ÀÖ¾î¾ß ÇÑ´Ù.

¶ó. º¹±¸¸¦ À§ÇÑ ÇØ´ç ÇÁ·Î´öÆ® ¿£Áö´Ï¾î¿¡°Ô ±â¼úÁö¿øÀ» ¹ÞÀ» Áغñ´Â µÇ¾î Àִ°¡?
- µ¥ÀÌÅͺ£À̽º Àü¹®°¡¿Í »óÀÇÇÏ¿©¾ß ÇÒ °æ¿ì´Â ¾ø´ÂÁö, ¸¸¾à µ¥ÀÌÅͺ£À̽º Àü¹®°¡¿ÍÀÇ ¿¬¶ô ȤÀº ¹æ¹®Áö¿øÀÌ ÇÊ¿äÇÑ °æ¿ì Down Time¿¡ ´ëÇÑ ´ëÃ¥Àº ¸¶·ÃµÇ¾î Àִ°¡?

2.3 Àå¾Ö À¯Çüº° º¹±¸ÀýÂ÷

2.3.1 µ¥ÀÌÅÍÆÄÀÏ ¼Õ»ó ½Ã º¹±¸ ÀýÂ÷

System Tablespace°¡ ¾Æ´Ñ TablespaceÀÇ µ¥ÀÌÅÍÆÄÀÏ ¼Õ»óÀÌ ¹ß»ýÇÏ¿© º¹±¸¸¦ ¼öÇàÇÏ¿©¾ß ÇÒ °æ¿ì¿¡´Â ¿¡·¯¸Þ¼¼Áö°¡ ´Þ¸® returnµÉ °æ¿ì°¡ ÀÖ´Ù. ÀÌ °æ¿þ ¿¡·¯¸Þ¼¼Áö¿¡ µû¶ó 1-1 ~1-4±îÁö ÇØ´çµÇ´Â ºÎºÐÀ» ÂüÁ¶ÇÏ¿© º¹±¸Çϵµ·Ï ÇÑ´Ù.

1-1. SYSTEM Tablespace DatafileÀÌ ¾Æ´Ñ DatafileÀÇ Recovery

ORA-1116, ORA-1110, ORA-736 8À» ReturnÇÏ´Â °æ¿ì¿¡´Â ¾Æ·¡ÀÇ Recovery ¼öÇà ¹æ¹ýÀ» ÅëÇØ RecoveryÇÑ´Ù.

oerr ora 1116
01116, 00000, "error in opening database file %s"
*Cause: Usually the file is not accessible.
*Action: Restore the database file.

oerr ora 1110
01110, 00000, "data file %s: ''%s''"
*Cause: Reporting file name for details of another error
*Action: See associated error message

oerr ora 7368
07368, 00000, "sfofi: open error, unable to open database file."
*Cause: Open system call returned an error.
*Action: Check errno. Verify existence, and permissions on database files.

Çö»ó ¹× Error ³»¿ë

SQL> insert into bonus
values(''EEEE'',''EEEE'',99999,999);
insert into bonus

ERROR at line 1:
ORA-01116: error in opening database file 5
ORA-01110: data file 5: ''/u02/ORACLE/BACKUP/usrBACKUP.dbf''
ORA-07368: sfofi: open error, unable to open database file.
IBM AIX RISC System/6000 Error: 2: No such file or directory

À§¿Í °°Àº Error°¡ Return µÉ °ÍÀÌ´Ù. ±×·¯³ª À§¿Í °°ÀÌ Datafile ÀÌ ¼Õ»óÀ» ÀÔ¾úÀ½¿¡µµ Error¸¦ ¹Ù·Î ReturnÇÏÁö ¾Ê°í Á¤»óÀûÀ¸ ·Î DMLÀ̳ª DDLÀ» »ç¿ëÇÒ ¼ö ÀÖÀ» Áöµµ ¸ð¸¥´Ù. ¿Ö³ÄÇÏ¸é ¾ÆÁ÷ SGAÀÇ Database buffer¾È¿¡ ObjectµéÀÌ Á¸ÀçÇÏ´Â °æ¿ì´Â DBWR°¡ Datafile¿¡ Database bufferÀÇ ³»¿ëÀ» writeÇϱâ Àü±îÁö ´Â Error ¾øÀÌ Á¤»óÀûÀ¸·Î ÀÛ¾÷À» ¼öÇàÇÒ °ÍÀ̸ç Datafile¿¡ writeÇÏ·Á´Â ¼ø°£¿¡¾ß ºñ·Î¼­ Error¸¦ Return ÇÒ °ÍÀÌ´Ù.

Recovery ¼öÇà ¹æ¹ý

1. V$DATAFILE¿¡¼­ DatafileÀ» CheckÇÑ´Ù.

SVRMGR> select FILE#,STATUS,ENABLED,BYTES,NAME
2> from v$Datafile;

FILE# STATUS ENABLED BYTES NAME
----- ------- --------- ------- --------------
1 SYSTEM READ WRITE 20971520 /u02/ORACLE/BACKUP/systBACKUP.dbf
2 ONLINE READ WRITE 41943040 /u02/ORACLE/BACKUP/rbsBACKUP.dbf
3 ONLINE READ WRITE 52428800 /u02/ORACLE/BACKUP/tempBACKUP.dbf
4 ONLINE READ WRITE 10485760 /u02/ORACLE/BACKUP/toolBACKUP.dbf
5 ONLINE READ WRITE 0 /u02/ORACLE/BACKUP/usrBACKUP.dbf

5 rows selected.

2. PhysicalÇÑ storage directory¸¦ CheckÇغ»´Ù.

$ ls
ctrl1BACKUP.ctl log1BACKUP.dbf log2_m_BACKUP.dbf tempBACKUP.dbf
ctrl2BACKUP.ctl log1_m_BACKUP.dbf rbsBACKUP.dbf toolBACKUP.dbf
ctrl3BACKUP.ctl log2BACKUP.dbf systBACKUP.dbf

3. ABORT OptionÀ¸·Î SHUTDOWN ÇÑ´Ù.

SVRMGR> shutdown ABORT
ORACLE instance shut down.

4. DatafileÀÌ ¼Õ»óµÇ¾úÀ½À» È®ÀÎÇßÀ¸¸é OnlineÀ¸·Î Backup¹ÞÀº ÇØ´ç DatafileÀ» host command·Î COPYÇÑ´Ù.

$ cp /admhome/oracle/product/stage/backup/hot/ usrBACKUP.dbf /u02/ORACLE/BACKUP
$ ls -l
-rw-r----- 1 oracle dba 10489856 Oct 17 15:48 usrBACKUP.dbf

5. STARTUP MOUNTÇÑ´Ù. Database¸¦ Open±îÁö ÇÏ·ÁÇϸé ORA-1113 Error¸¦ ReturnÇÒ °ÍÀÌ´Ù.

SVRMGR> startup
ORACLE instance started.
Database mounted.
ORA-01113: file 5 needs media recovery
ORA-01110: data file 5: ''/u02/ORACLE/BACKUP/usrBACKUP.dbf''

6. V$DATAFILE¿¡¼­ DatafileÀÌ ONLINE »óÅÂÀÎÁö È®ÀÎÇÑ´Ù. ¸¸¾à OFFLINEÀ̶ó¸é ALTER DATABASE DATAFILE ''/u02/ORACLE/BACKUP/usrBACKUP.dbf'' ONLINE ; À» ¼öÇàÇÑ´Ù.

SVRMGR> select FILE#,STATUS,ENABLED,BYTES,NAME
2> from v$Datafile;

FILE# STATUS ENABLED BYTES NAME
------- ------- ---------- --------- ---------
1 SYSTEM READ WRITE 20971520 /u02/ORACLE/BACKUP/systBACKUP.dbf
2 ONLINE READ WRITE 41943040 /u02/ORACLE/BACKUP/rbsBACKUP.dbf
3 ONLINE READ WRITE 52428800 /u02/ORACLE/BACKUP/tempBACKUP.dbf
4 ONLINE READ WRITE 10485760 /u02/ORACLE/BACKUP/toolBACKUP.dbf
5 ONLINE READ WRITE 10485760 /u02/ORACLE/BACKUP/usrBACKUP.dbf

5 rows selected.

7. ¼Õ»óµÈ DatafileÀ» RECOVER DATAFILE Command·Î RecoveryÇÑ´Ù.

SVRMGR> recover Datafile ''/u02/ORACLE/BACKUP/usrBACKUP.dbf'';
ORA-00279: Change 6716 generated at 10/15/96 15:58:38 needed for thread 1
ORA-00289: Suggestion : /admhome/oracle/admin/BACKUP/arch/arch_49.arc
ORA-00280: Change 6716 for thread 1 is in sequence #49
Specify log: {=suggested | filename | AUTO | CANCEL}
auto
Log applied.

Physical directory¿¡ RestoreµÈ DatafileÀ» Archive log¸¦ Àû¿ëÇÏ¿© Error°¡ ¹ß»ýÇß´ø ½ÃÁ¡±îÁö Recovery ÇÑ´Ù. À̶§ Archive log¸¦ Àû¿ëÇÔ¿¡ À־ AUTO¶ó°í ¸í½ÃÀûÀ¸·Î ±â¼úÇØÁÖ¸é ÀÚµ¿À¸·Î Recovery¿¡ ÇÊ¿äÇÑ ¸ðµç Archive log¸¦ Àû¿ëÇÑ´Ù.

8. Database¸¦ OPENÇÑ´Ù.



SVRMGR> alter database open;
Statement processed.

9. V$DATAFILE¿¡¼­ DatafileÀÇ »óŸ¦ CheckÇÑ´Ù.

SVRMGR> select FILE#,STATUS,ENABLED,BYTES,NAME
2> from v$Datafile;

FILE# STATUS ENABLED BYTES NAME
-------- ------- ---------- ---------- -------
1 SYSTEM READ WRITE 20971520 /u02/ORACLE/BACKUP/systBACKUP.dbf
2 ONLINE READ WRITE 41943040 /u02/ORACLE/BACKUP/rbsBACKUP.dbf
3 ONLINE READ WRITE 52428800 /u02/ORACLE/BACKUP/tempBACKUP.dbf
4 ONLINE READ WRITE 10485760 /u02/ORACLE/BACKUP/toolBACKUP.dbf
5 ONLINE READ WRITE 10485760 /u02/ORACLE/BACKUP/usrBACKUP.dbf

5 rows selected.

10. ¸¶Áö¸·À¸·Î SQLPLUS·Î µé¾î°¡ data°¡ º¹±¸µÇ¾ú´ÂÁö È®ÀÎÇÑ´Ù.

1-2. SYSTEM Tablespace DatafileÀÌ ¾Æ´Ñ DatafileÀÇ Recovery 2

ORA-1578, ORA-1110À» ReturnÇÏ´Â °æ¿ì¿¡´Â ¾Æ·¡ÀÇ Recovery ¼öÇà ¹æ¹ýÀ» ÅëÇØ RecoveryÇÑ´Ù.

oerr ora 1578

01578, 00000, "ORACLE data block corrupted (file # %s, block # %s)"
*Cause: The data block indicated was corrupted mostly due to software errors.
*Action: Try to restore the segment containing the block indicated. This may involve dropping the segment and recreating it. If there is a trace file, report the errors in it to your ORACLE representative.

oerr ora 1110
01110, 00000, "data file %s: ''%s''"
*Cause: Reporting file name for details of another error
*Action: See associated error message

Çö»ó ¹× Error ³»¿ë

SQL> select * from bonus;
ERROR:
ORA-01578:ORACLE data block corrupted(file #5, block # 13)
ORA-01110:data file 5: ''/u02/ORACLE/BACKUP/usrBACKUP.dbf''
no rows selected

À§¿¡¼­ ¾Ë ¼ö ÀÖµíÀÌ DatafileÀÇ 1°³ BlockÀÌ ¼Õ»óµÇ¾ú´Ù. ÀÌ °æ¿ì¿¡µµ DatafileÀÌ ¼Õ»óÀ» ÀÔ¾úÀ½¿¡µµ Error(ORA-1578)¸¦ ¹Ù·Î ReturnÇÏÁö ¾Ê°í Á¤»óÀûÀ¸·Î DMLÀ̳ª DDLÀ» »ç¿ëÇÒ ¼ö ÀÖÀ» Áöµµ ¸ð¸¥´Ù. ¾ÆÁ÷ SGA¾È¿¡ ÀÖ´Â ObjectµéÀÌ Àֱ⠶§¹®ÀÌ´Ù. ±×·¯³ª ¼Õ»óµÈ Block(Blocksize=4096)¿¡ ÀÖ´Â Data¿¡ ´ëÇØ Access ÇÏ·ÁÇϸé À§¿Í °°Àº Error¸¦ Return ÇÒ °ÍÀÌ´Ù.

Recovery ¼öÇà ¹æ¹ý

1. ÀÏ´Ü V$DATAFILEÀ» È®ÀÎÇغ»´Ù.

SVRMGR> select FILE#,STATUS,ENABLED,BYTES,NAME
2> from v$Datafile;

FILE# STATUS ENABLED BYTES NAME
------- ------- -------- -------- --------
1 SYSTEM READ WRITE 20971520 /u02/ORACLE/BACKUP/systBACKUP.dbf
2 ONLINE READ WRITE 41943040 /u02/ORACLE/BACKUP/rbsBACKUP.dbf
3 ONLINE READ WRITE 52428800 /u02/ORACLE/BACKUP/tempBACKUP.dbf
4 ONLINE READ WRITE 10485760 /u02/ORACLE/BACKUP/toolBACKUP.dbf
5 ONLINE READ WRITE 52428800 /u02/ORACLE/BACKUP/usrBACKUP.dbf

5 rows selected.

2. PhysicalÇÑ storage directory¸¦ CheckÇغ»´Ù.

$ ls -l
rw-r----- 1 oracle dba 52432896 Oct 17 17:53 usrBACKUP.dbf

È®ÀÎÇØ º¸¸é DatafileÀº ±×´ë·Î Á¸ÀçÇÑ´Ù.

3. ABORT OptionÀ¸·Î Shutdown ÇÑ´Ù.

SVRMGR> shutdown ABORT
ORACLE instance shut down.

ÀÌ °æ¿ì¿¡ NORMALÀ̳ª IMMEDIATE·Î ShutdownÇÏ·ÁÇÏ¸é ´ÙÀ½°ú °°Àº Error°¡ ¹ß»ýÇÒ °ÍÀÌ´Ù.

ORA-01122: database file 5 failed verification check
ORA-01110: data file 5: ''/u02/ORACLE/BACKUP/usrBACKUP.dbf''
ORA-01208: data file is an old version - not accessing current version

SVRMGR> !oerr ora 1122
01122, 00000, "database file %s failed verification check"
*Cause: The information in this file is inconsistent with information from the control file. See accompanying message for reason.
*Action: Make certain that the db files and control files are the correct files for this database.

4. DatafileÀÌ ¼Õ»óµÇ¾úÀ½À» È®ÀÎÇßÀ¸¸é OnlineÀ¸·Î Backup¹ÞÀº ÇØ´ç DatafileÀ» host command·Î COPYÇÑ´Ù.

$ cp /admhome/oracle/product/stage/backup/hot/ usrBACKUP.dbf /u02/ORACLE/BACKUP
$ ls -l
-rw-r----- 1 oracle dba 10489856 Oct 17 15:48 usrBACKUP.dbf

5. STARTUP MOUNTÇÑ´Ù. Database¸¦ Open±îÁö ÇÏ·ÁÇϸé ORA-1113 Error¸¦ ReturnÇÒ °ÍÀÌ´Ù.

SVRMGR> startup
ORACLE instance started.
Database mounted.
ORA-01113: file 5 needs media recovery
ORA-01110: data file 5: ''/u02/ORACLE/BACKUP/usrBACKUP.dbf''

6. V$DATAFILE¿¡¼­ DatafileÀÌ ONLINE »óÅÂÀÎÁö È®ÀÎÇÑ´Ù. ¸¸¾à OFFLINEÀ̶ó¸é ALTER DATABASE DATAFILE ''/u02/ORACLE/BACKUP/usrBACKUP.dbf'' ONLINE ; À» ¼öÇàÇÑ´Ù.

SVRMGR> select FILE#,STATUS,ENABLED,BYTES,NAME
2> from v$Datafile;

FILE# STATUS ENABLED BYTES NAME
------ ------- -------- ----------- ---------
1 SYSTEM READ WRITE 20971520 /u02/ORACLE/BACKUP/systBACKUP.dbf
2 ONLINE READ WRITE 41943040 /u02/ORACLE/BACKUP/rbsBACKUP.dbf
3 ONLINE READ WRITE 52428800 /u02/ORACLE/BACKUP/tempBACKUP.dbf
4 ONLINE READ WRITE 10485760 /u02/ORACLE/BACKUP/toolBACKUP.dbf
5 ONLINE READ WRITE 52428800 /u02/ORACLE/BACKUP/usrBACKUP.dbf

5 rows selected.

7. ¼Õ»óµÈ DatafileÀ» RECOVER DATAFILE command·Î RecoveryÇÑ´Ù.

SVRMGR> recover Datafile ''/u02/ORACLE/BACKUP/usrBACKUP.dbf'';
ORA-00279: Change 6890 generated at 10/17/96 16:25:37 needed for thread 1
ORA-00289: Suggestion : /admhome/oracle/admin/BACKUP/arch/arch_76.arc
ORA-00280: Change 6890 for thread 1 is in sequence #76
ORA-00278: Logfile ''/admhome/oracle/admin/BACKUP/arch/arch_75.arc'' no longer needed fy

Log applied.
Media recovery complete.

8. Database¸¦ OPENÇÑ´Ù.

SVRMGR> alter database open;
Statement processed.

9. V$DATAFILE¿¡¼­ DatafileÀÇ »óŸ¦ CheckÇÑ´Ù.

SVRMGR> select FILE#,STATUS,ENABLED,BYTES,NAME
2> from v$Datafile;

FILE# STATUS ENABLED BYTES NAME
---------- ------------- --------------------
1 SYSTEM READ WRITE 20971520 /u02/ORACLE/BACKUP/systBACKUP.dbf
2 ONLINE READ WRITE 41943040 /u02/ORACLE/BACKUP/rbsBACKUP.dbf
3 ONLINE READ WRITE 52428800 /u02/ORACLE/BACKUP/tempBACKUP.dbf
4 ONLINE READ WRITE 10485760 /u02/ORACLE/BACKUP/toolBACKUP.dbf
5 ONLINE READ WRITE 52428800 /u02/ORACLE/BACKUP/usrBACKUP.dbf

5 rows selected.

10. ¸¶Áö¸·À¸·Î SQL*PLUS·Î µé¾î°¡ data°¡ º¹±¸µÇ¾ú´ÂÁö È®ÀÎÇÑ´Ù.

1-3. SYSTEM Tablespace DatafileÀÌ ¾Æ´Ñ DatafileÀÇ Recovery 3

ORA-376, ORA-1110À» Return ÇÏ´Â °æ¿ì¿¡´Â ¾Æ·¡ÀÇ Recovery ÀýÂ÷¸¦ ÅëÇØ ¼öÇàÇÑ´Ù.

oerr ora 376
00376, 00000, "file %s cannot be read at this time"
*Cause: attempting to read from a file that is not readable. Most likely the file is offline.
*Action: Check the state of the file. Bring it online

oerr ora 1110
01110, 00000, "data file %s: ''%s''"
*Cause: Reporting file name for details of another error
*Action: See associated error message

Çö»ó ¹× Error ³»¿ë

SQL> insert into bonus
2 values (''MMMMMM'',''JJJJJJ'',999999,888888);
1 row created.

SQL> /
insert into bonus
*
ERROR at line 1:
ORA-00376: file 5 cannot be read at this time
ORA-01110: data file 5: ''/u02/ORACLE/BACKUP/usrBACKUP.dbf''

À§ Error¸¦ º¸¸é DatafileÀÌ ¼Õ»óµÇ¾úÀ½À» ¾Ë ¼ö ÀÖ´Ù. ÇöÀç ÀÌ DatafileÀº ¾Ë ¼ö ¾ø´Â ¼Õ»óÀ¸·Î ÀÎÇØ ORACLE¿¡ ÀÇÇØ ³»ºÎÀûÀ¸·Î OfflineµÇ¾ú°í V$DATAFILE¿¡¼­ DatafileÀÇ Status¸¦ º¸¸é RECOVER·Î ³ªÅ¸³²À» º¸°Ô µÉ °ÍÀÌ´Ù. ÀÌó·³ ORA-376°°Àº Error°¡ ¹ß»ýÇÏ¸é ´ÙÀ½°ú °°ÀÌ º¹±¸ÇÑ´Ù.

Recovery ¼öÇà ¹æ¹ý

1. V$DATAFILEÀ» È®ÀÎÇØ º»´Ù.

SVRMGR> select FILE#,STATUS,ENABLED,BYTES,NAME
2> from v$Datafile;

FILE# STATUS ENABLED BYTES NAME
------ ------- ----------- -------- --------
1 SYSTEM READ WRITE 20971520 /u02/ORACLE/BACKUP/systBACKUP.dbf
2 ONLINE READ WRITE 41943040 /u02/ORACLE/BACKUP/rbsBACKUP.dbf
3 ONLINE READ WRITE 52428800 /u02/ORACLE/BACKUP/tempBACKUP.dbf
4 ONLINE READ WRITE 10485760 /u02/ORACLE/BACKUP/toolBACKUP.dbf
5 RECOVER READ WRITE 10485760 /u02/ORACLE/BACKUP/usrBACKUP.dbf

5 rows selected.

2. Á¤»óÀûÀÎ DatafileÀ» RestoreÇÑ´Ù.

$ cp /admhome/oracle/product/stage/backup/hot/ usr* /u02/ORACLE/BACKUP
$ ls -l
-rw-r----- 1 oracle dba 10489856 Oct 17 19:21 usrBACKUP.dbf

Recovery Çϱâ Àü¿¡ ´Ù¸¥ DatafileÀÇ º¹±¸ °úÁ¤Ã³·³ ShutdownÀ» ÇÏÁö ¾Ê°í OPEN »óÅ¿¡¼­ Recovery°¡ °¡´ÉÇÏ´Ù.

SVRMGR>Recover Tablespace users;
¶Ç´Â Recover Datafile ¡®/u02/ORACLE/BACKUP;

ORA-00279: Change 6716 generated at 10/15/96 15:58:38 needed for thread 1
ORA-00289: Suggestion : /admhome/oracle/admin/BACKUP/arch/arch_49.arc
ORA-00280: Change 6716 for thread 1 is in sequence #49
Specify log: {=suggested | filename | AUTO | CANCEL}
auto

Log applied.

Media recovery complete.

3. DatafileÀÇ »óŸ¦ È®ÀÎÇÑ´Ù.

SVRMGR> select FILE#,STATUS,ENABLED,BYTES,NAME
2> from v$Datafile;

FILE# STATUS ENABLED BYTES NAME
------ ------- -------- --------- ---------
1 SYSTEM READ WRITE 20971520 /u02/ORACLE/BACKUP/systBACKUP.dbf
2 ONLINE READ WRITE 41943040 /u02/ORACLE/BACKUP/rbsBACKUP.dbf
3 ONLINE READ WRITE 52428800 /u02/ORACLE/BACKUP/tempBACKUP.dbf
4 ONLINE READ WRITE 10485760 /u02/ORACLE/BACKUP/toolBACKUP.dbf
5 OFFLINE READ WRITE 10485760 /u02/ORACLE/BACKUP/usrBACKUP.dbf

5 rows selected.

À§¿¡¼­¿Í °°ÀÌ Recovery°¡ ¼º°øÀûÀ¸·Î ³¡³­ DatafileÀº Status°¡ OFFLINEÀ¸·Î ³ªÅ¸³­´Ù. °í·Î ÀÌ »óÅ¿¡¼­ Table¿¡ ´ëÇØ access ÇÏ·ÁÇÏ¸é ¸Ç Ã³À½ DatafileÀÌ ¼Õ»óµÇ¾úÀ» ¶§¿¡ ³ªÅ¸³­ Error¿Í ¶È°°Àº Error°¡ ReturnµÉ °ÍÀÌ´Ù. ±×·¸´Ù°í Recovery°¡ ½ÇÆÐÇÑ °ÍÀº Àý´ë ¾Æ´Ï´Ù. ÀÌ·¯ÇÑ Error°¡ ³ªÅ¸³ª´Â °ÍÀº V$DATAFILE ¿¡¼­ º¸µíÀÌ RecoveryµÈ DatafileÀÌ OFFLINE µÇ¾î Àֱ⠶§¹®ÀÌ ´Ù. ±×·¯¹Ç·Î ALTER DATABASE DATAFILE filename ONLINE command¸¦ »ç¿ëÇÏ¿© Tablespace¸¦ ONLINEÀ¸·Î º¯°æ½ÃÄÑ¾ß Table¿¡ ´ëÇÑ access°¡ °¡´ÉÇÒ °ÍÀÌ´Ù.

SQL> select * from bonus;
ERROR:
ORA-00376: file 5 cannot be read at this time
ORA-01110: data file 5: ''/u02/ORACLE/BACKUP/usrBACKUP.dbf''

5. Tablespace¸¦ ONLINEÀ¸·Î º¯°æÇÑ´Ù.

SVRMGR> alter database Datafile ''/u02/ORACLE/BACKUP/usrBACKUP.dbf'' online;
Statement processed.

1-4. SYSTEM Tablespace DatafileÀÇ Recovery

SYSTEM TablespaceÀÇ DatafileÀÌ ¼Õ»óÀ» ÀÔ¾úÀ» °æ¿ì¿¡´Â Error °¡ 2°¡Áö TypeÀ¸·Î ³ªÅ¸³­´Ù. ORA-604, ORA-1116, ORA-7368À» ReturnÇÏ´Â °æ¿ì¿Í ORA-1092°¡ ³ªÅ¸³ª´Â °æ¿ìÀÌ´Ù. ¾Æ·¡ÀÇ Recovery ¼öÇà ¹æ¹ýÀ» ÅëÇØ RecoveryÇÑ´Ù.

oerr ora 604
00604, 00000, "error occurred at recursive SQL level %s"
*Cause: An error occurred while processing a recursive SQL statement(a statement applying to internal dictionary tables).
*Action: If the situation described in the next error on the stack can be corrected, do so; otherwise contact Oracle Support.

oerr ora 1116
01116, 00000, "error in opening database file %s"
*Cause: Usually the file is not accessible.
*Action: Restore the database file.

oerr ora 1092
01092, 00000, "ORACLE instance terminated. Disconnection forced"
*Cause: The instance this process was connected to was terminated abnormally, probably via a shutdown abort. This process
was forced to disconnect from the instance.
*Action: When instance has been restarted, retry action.

Çö»ó ¹× Error ³»¿ë

SQL> insert into bonus
2 values(''EEEE'',''EEEE'',99999,999);

1 row created.

SQL> /
insert into bonus
*

ERROR:
ORA-00604: error occurred at recursive SQL level 1
ORA-01116: error in opening database file 1
ORA-01110: data file 1: ''/u02/ORACLE/BACKUP/systBACKUP.dbf''
ORA-07368: sfofi: open error, unable to open database file.
IBM AIX RISC System/6000 Error: 2: No such file or directory

À§¿Í °°Àº Error°¡ Return µÉ °ÍÀÌ´Ù. ±×·¯³ª À§¿Í °°ÀÌ SYSTEM TablespaceÀÇ DatafileÀÌ ¼Õ»óÀ» ÀÔ¾úÀ½¿¡µµ Error¸¦ ¹Ù·Î ReturnÇÏÁö ¾Ê°í Á¤»óÀûÀ¸·Î DMLÀ» »ç¿ëÇÒ ¼ö ÀÖÀ» Áöµµ ¸ð¸¥´Ù. ±âº»ÀûÀ¸·Î ORACLEÀº Data¸¦ Block´ÜÀ§·Î accessÇÏ ¿© SGAÀÇ Database Buffer¿¡ ¿Ã·Á ³õ°í Data¿¡ ´ëÇÑ º¯È­¸¦ ÀÛ ¾÷ ÇÑ´Ù. ÇöÀç Recovery test¸¦ À§ÇÑ InstanceÀÎ BACKUPÀº ¡®BLOCK_SIZE = 4096¡¯À¸·Î ¼³Á¤µÇ¾î Creation µÇ¾î ÀÖÀ¸¹Ç·Î ÇÏ ³ªÀÇ TableÀ» SelectÇßÀ»Áö¶óµµ ±× TableÀÌ ÀÖ´Â Block°ú ±× TableÀÌ ÂüÁ¶ÇÏ´Â Data Dictionary¸¦ °°ÀÌ Database Buffer¿Í Data Dictionary Cache¿¡ ¿Ã¸°´Ù. ±×·¯¹Ç·Î ÇöÀç SGA¾È¿¡ ¿Ã·Á Áø Data Dictionary¸¦ AccessÇÏ·ÁÇϸé System Tablespace DatafileÀÌ ¾øÀ½¿¡µµ Dictionary¸¦ º¼ ¼ö ÀÖÁö¸¸ ¸¸¾à ¾ÆÁ÷ SGA ÀÇ Dictionary Cache¿¡ ¿Ã¶ó¿Í ÀÖÁö ¾ÊÀº Dictionary¸¦ Access ÇÏ·ÁÇϰųª ƯÁ¤ ½ÃÁ¡(Dictionary CacheÀÇ °ÍÀ» SYSTEM Tablespace Datafile¿¡ WriteÇÏ·Á ÇÒ ¶§)¿¡ µµ´ÞÇϸé À§¿Í °°Àº Error¸¦ Return ÇÒ °ÍÀÌ´Ù. Error Message°¡ ´ÙÀ½°ú °°ÀÌ Return µÇ´õ¶óµµ ´ÙÀ½ÀÇ Action¿¡ µû¶ó Recovery¸¦ ¼öÇàÇÑ´Ù.

SQL> insert into bonus
2 values(''EEEEEEE'',''EEEEEE'',888888,8888888);
insert into bonus

ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 1
ORA-01578: ORACLE data block corrupted (file # 1, block # 259)
ORA-01110: data file 1: ''/u02/ORACLE/BACKUP/systBACKUP.dbf''

¶Ç´Â

SQL> /
insert into bonus
*
ERROR at line 1:
ORA-01092: ORACLE instance terminated. Disconnection forced

Recovery ¼öÇà ¹æ¹ý

1. V$DATAFILE¿¡¼­ DatafileÀ» CheckÇÑ´Ù.

SVRMGR> select FILE#,STATUS,ENABLED,BYTES,NAME
2> from v$Datafile;

FILE# STATUS ENABLED BYTES NAME
----- ------- --------- ------------ ---------
1 SYSTEM READ WRITE 20971520 /u02/ORACLE/BACKUP/systBACKUP.dbf
2 ONLINE READ WRITE 41943040 /u02/ORACLE/BACKUP/rbsBACKUP.dbf
3 ONLINE READ WRITE 52428800 /u02/ORACLE/BACKUP/tempBACKUP.dbf
4 ONLINE READ WRITE 10485760 /u02/ORACLE/BACKUP/toolBACKUP.dbf
5 ONLINE READ WRITE 10485760 /u02/ORACLE/BACKUP/usrBACKUP.dbf

5 rows selected.

2. PhysicalÇÑ Storage directory¸¦ CheckÇغ»´Ù.

$ ls /u02/ORACLE/BACKUP
ctrl1BACKUP.ctl log1BACKUP.dbf log2_m_BACKUP.dbf tempBACKUP.dbf
ctrl2BACKUP.ctl log1_m_BACKUP.dbf rbsBACKUP.dbf toolBACKUP.dbf
ctrl3BACKUP.ctl log2BACKUP.dbf

3. ABORT OptionÀ¸·Î Shutdown ÇÑ´Ù.

SVRMGR> shutdown
ORACLE instance shut down.

ÀÌ °æ¿ì¿¡ NORMALÀ̳ª IMMEDIATE·Î SHUTDOWNÇÏ·ÁÇÏ¸é ´ÙÀ½°ú °°Àº Error°¡ ¹ß»ýÇÒ °ÍÀÌ´Ù.

ORA-01122: database file 5 failed verification check
ORA-01110: data file 5: ''/u02/ORACLE/BACKUP/usrBACKUP.dbf''
ORA-01208: data file is an old version - not accessing current version
SVRMGR> !oerr ora 1122
01122, 00000, "database file %s failed verification check"
*Cause: The information in this file is inconsistent with informationfrom the control file. See accompanying message for reason.
*Action: Make certain that the db files and control files are the correct files for this database.

4. DatafileÀÌ ¼Õ»óµÇ¾úÀ½À» È®ÀÎÇßÀ¸¸é OnlineÀ¸·Î Backup¹ÞÀº ÇØ´ç DatafileÀ» host command·Î COPYÇÑ´Ù.

$ cp /admhome/oracle/product/stage/backup/hot/ systBACKUP.dbf /u02/ORACLE/BACKUP
$ ls -l
-rw-r----- 1 oracle dba 20971520 Oct 17 15:48 systBACKUP.dbf

5. STARTUP MOUNTÇÑ´Ù. Database¸¦ Open±îÁö ÇÏ·ÁÇϸé ORA-1113 Error¸¦ ReturnÇÒ °ÍÀÌ´Ù.

SVRMGR> startup
ORACLE instance started.
Database mounted.

ORA-01113: file 5 needs media recovery
ORA-01110: data file 5: ''/u02/ORACLE/BACKUP/usrBACKUP.dbf''

6. ¼Õ»óµÈ DatafileÀ» RECOVER DATAFILE command·Î RecoveryÇÑ´Ù.

SVRMGR> recover Datafile ''/u02/ORACLE/BACKUP/systBACKUP.dbf'';
ORA-00279: Change 6716 generated at 10/15/96 15:58:38 needed for thread 1
ORA-00289: Suggestion : /admhome/oracle/admin/BACKUP/arch/arch_49.arc
ORA-00280: Change 6716 for thread 1 is in sequence #49
Specify log: {=suggested | filename | AUTO | CANCEL}
auto
Log applied.

7. Database¸¦ OPENÇÑ´Ù.

SVRMGR> alter database open;
Statement processed.

8. V$DATAFILE¿¡¼­ DatafileÀÇ »óŸ¦ CheckÇÑ´Ù.

SVRMGR> select FILE#,STATUS,ENABLED,BYTES,NAME
2> from v$Datafile;

FILE# STATUS ENABLED BYTES NAME
------ ------- ---------- --------- ---------
1 SYSTEM READ WRITE 20971520 /u02/ORACLE/BACKUP/systBACKUP.dbf
2 ONLINE READ WRITE 41943040 /u02/ORACLE/BACKUP/rbsBACKUP.dbf
3 ONLINE READ WRITE 52428800 /u02/ORACLE/BACKUP/tempBACKUP.dbf
4 ONLINE READ WRITE 10485760 /u02/ORACLE/BACKUP/toolBACKUP.dbf
5 ONLINE READ WRITE 10485760 /u02/ORACLE/BACKUP/usrBACKUP.dbf

5 rows selected.

9. ¸¶Áö¸·À¸·Î SQLPLUS·Î µé¾î°¡ data°¡ º¹±¸µÇ¾ú´ÂÁö È®ÀÎÇÑ´Ù.

2.3.2 Á¦¾îÆÄÀÏ ¼Õ»ó ½Ã º¹±¸ÀýÂ÷

1. Mirrored µÇ´ÂControl file ÀüºÎ°¡ ¼Õ»óµÈ °æ¿ìÀÇ Recovery

oerr ora 210
00210, 00000, "cannot open control file ''%s''"
*Cause: Cannot open the control file
*Action: Check to make sure the control file is there and not locked by some other program

Çö»ó ¹× Error ³»¿ë

SQL> alter tablespace users add Datafile ''/u02/ORACLE/BACKUP/usr2BACKUP.dbf'';
alter tablespace users add Datafile ''/u02/ORACLE/BACKUP/usr2BACKUP.dbf''
*
ERROR at line 1:
ORA-00210: cannot open control file ''/u02/ORACLE/BACKUP/ctrl1BACKUP.ctl''
ORA-07368: sfofi: open error, unable to open database file.
IBM AIX RISC System/6000 Error: 2: No such file or directory

¡°MirroringÀÌ µÇ°í ÀÖµç ¾Æ´Ïµç °£¿¡ Control fileÀÌ ¼Õ»óÀ» ÀÔ¾ú´Ù¸é Database´Â Background process°¡ Control file¿¡ óÀ½À¸·Î access ÇÏ´Â ½ÃÁ¡±îÁö´Â Á¤»óÀûÀ¸·Î ¿î¿µµÈ´Ù. ±×·¯³ª ÀÌ ½ÃÁ¡( DatabaseÀÇ ¹°¸®ÀûÀÎ ±¸Á¶¸¦ º¯°æ½ÃÅ°´Â ÀÛ¾÷, Áï Database fileÀ» Ãß°¡Çϰųª »èÁ¦ÇÏ´Â ÀÛ¾÷À» ÇÏ·ÁÇÏ´Â ½ÃÁ¡)¿¡ µµ´ÞÇϸé ORACLEÀº Database¿Í Instance¸¦ °­Á¦·Î terminate ½ÃŲ´Ù.
ÀÏ´Ü Oracle¿¡ ÀÇÇØ °­Á¦·Î terminated µÈ ÈÄ¿¡´Â Control fileÀÌ RecoveryµÇ±â Àü±îÁö´Â Database¸¦ OPEN ÇÒ ¼ö ¾øÀ¸¸ç MOUNTÇÒ ¼öµµ ¾ø´Ù. ¡±¶ó°í ORACLE 7.3 Manual Admin Guide 24-53¿¡´Â ±â¼úµÇ¾î ÀÖÁö¸¸ ½ÇÁ¦ TestÇÑ ¹Ù·Î´Â OracleÀº terminate µÇÁö ¾Ê¾Ò°í ´ÜÁö ¾Æ·¡¿Í °°Àº Error¸¸À» ReturnÇÒ »ÓÀ̾ú´Ù. Âü°í·Î ¾Æ·¡ÀÇ Recovery °úÁ¤Àº TestÇÑ °á°ú¸¦ ¹ÙÅÁÀ¸·Î ±â¼úÇÑ °ÍÀÌ´Ù.
Control fileÀº DatabaseÀÇ ¹°¸®ÀûÀÎ ±¸Á¶¿¡ °üÇÑ Á¤º¸¸¦ °¡Áö°í ÀÖ´Ù. ¸¸¾à DatabaseÀÇ ¹°¸®ÀûÀÎ ±¸¼º¿ä¼ÒÀÎ Database Datafile , Áï DatafileÀ̳ª redo log fileÀÌ Ãß°¡µÉ °æ¿ì DatabaseÀÇ º¯È­¸¦ ¹Ý¿µÇϱâ À§ÇØ ORACLEÀº Control file¿¡ DatabaseÀÇ º¯°æµÈ »çÇ×À» ±â·ÏÇÑ´Ù.
±×·¯¹Ç·Î ÀÌ Control fileÀÌ ¼Õ»óÀ» ÀÔ¾úÀ» °æ¿ì¿¡ ƯÁ¤ Tablespace¿¡ DatafileÀ» Ãß°¡ÇÏ·Á Çϸé ORACLEÀº Control file À» º¯°æÇÏ·Á°í ½ÃµµÇÏÁö¸¸ Control fileÀÌ »ç¶óÁ³±â ¶§¹®¿¡ Database ÀÇ º¯°æ »çÇ×À» ±â·ÏÇÒ ¼ö ¾ø°í Error(ORA-210)¸¦ Return ÇÒ °Í ÀÌ´Ù.

Recovery ¼öÇà ¹æ¹ý

1. À§ÀÇ Error(ORA-210)¿¡¼­¿Í °°ÀÌ Control file¿¡ ¼Õ»óÀÌ °¡ÇØÁ³À½À» ¾Ë ¼ö ÀÖµíÀÌ ½ÇÁ¦ PhysicalÇÑ Storage directory¿¡¼­ Control fileÀÇ º¯È­¸¦ È®ÀÎÇغ»´Ù.

$ls /u02/ORACLE/BACKUP
log1_m_BACKUP.dbf rbsBACKUP.dbf toolBACKUP.dbf
log2BACKUP.dbf systBACKUP.dbf usrBACKUP.dbf
log1BACKUP.dbf log2_m_BACKUP.dbf tempBACKUP.dbf

2. Control fileÀÌ ÀüºÎ ºÐ½ÇµÈ °æ¿ì¿¡´Â »õ·Î Control fileÀ» Creation ÇØ¾ß ÇÑ´Ù. ÀÌ °æ¿ì¿¡´Â vi editor¸¦ ¿­¾î ¾Æ·¡¿Í °°ÀÌ Control fileÀ» CreationÇÏ´Â script¸¦ ÀÛ¼ºÇÑ ÈÄ¿¡ Control fileÀ» »õ·Î CreationÇÏ°í RecoveryÇØ¾ß ÇÑ´Ù.

STARTUP NOMOUNT
CREATE CONTROL FILE REUSE DATABASE "BACKUP" NORESETLOGS ARCHIVELOG
MAXLOGFILES 32
MAXLOGMEMBERS 2
MAXDATAFILES 30
MAXINSTANCES 8
MAXLOGHISTORY 800

LOGFILE
GROUP 1 (
''/u02/ORACLE/BACKUP/log1BACKUP.dbf'',
''/u02/ORACLE/BACKUP/log1_m_BACKUP.dbf''
) SIZE 10K,
GROUP 2 (
''/u02/ORACLE/BACKUP/log2BACKUP.dbf'',
''/u02/ORACLE/BACKUP/log2_m_BACKUP.dbf''
) SIZE 10K

DATAFILE
''/u02/ORACLE/BACKUP/systBACKUP.dbf'',
''/u02/ORACLE/BACKUP/rbsBACKUP.dbf'',
''/u02/ORACLE/BACKUP/tempBACKUP.dbf'',
''/u02/ORACLE/BACKUP/toolBACKUP.dbf'',
''/u02/ORACLE/BACKUP/usrBACKUP.dbf'' ;

RECOVER DATABASE

ALTER SYSTEM ARCHIVE LOG ALL;

ALTER DATABASE OPEN;

3. À§ÀÇ script¸¦ ÀÛ¼ºÇÑ ÈÄ ½ÇÇà½ÃÅ°±â À§Çؼ­´Â ÇöÀç OPEN µÇ¾îÀÖ´Â Database¸¦ NOMOUNT »óÅ·Π¸¸µé¾î¾ß ÇÑ´Ù. ÇöÀç Open µÇ¾î ÀÖ´Â Database¸¦ NORMALÀ̳ª IMMEDIATE OptionÀ¸·Î SHUTDOWNÇÏ·ÁÇϸé Error(ORA-1122)°¡ Return µÉ °ÍÀÌ´Ù. ¿Ö³ÄÇϸé OracleÀº Control fileÀÌ °¡Áö°í ÀÖ´Â Database Structure¿¡ °üÇÑ Á¤º¸¿Í ½ÇÁ¦ Database StructureÀÇ ±¸Á¶¸¦ ºñ±³ ÇÏ¿© ÀÏÄ¡ÇÒ °æ¿ì¿¡¸¸ Database¸¦ SHUTDOWN, STARTUP ÇÒ ¼ö ÀÖ´Ù. ±×·¯³ª ÇöÀç Control fileÀÌ (Mirroring µÇ°í ÀÖ´Â Control file±îÁö) ÀüºÎ ¼Õ»óµÇ¾î ÀÖÀ¸¹Ç·Î ¼Õ»óµÈ Control fileÀÌ °¡Áö°í ÀÖ´Â ¼Õ»óµÈ Á¤º¸¿Í ½ÇÁ¦ Database Structure´Â ÀÏÄ¡ÇÏÁö ¾ÊÀ¸¹Ç·Î SHUTDOWNÀ» ABORT ÇØ¾ß Database´Â ShutdownµÉ °ÍÀÌ´Ù. ±×·¯³ª ÀÌ »óÅ¿¡¼­ Control fileÀ» ´Ù½Ã CreationÇÒ ¶§ Control fileÀº »ý¼ºµÇÁö¸¸ Recovery´Â ¼öÇàµÇÁö ¾Ê°í Database´Â OPENµÈ´Ù. ±×·¯¹Ç·Î ABORT OptionÀ¸·Î SHUTDOWN ÇØ¾ß Recovery±îÁö ¼öÇàÇÒ ¼ö ÀÖ´Ù.
¸¸¾à Control fileÀÌ ¼Õ»óµÇ±â ÀÌÀü¿¡ Backup¹Þ¾Æ ³õÀº Control fileÀÌ ÀÖ°í BackupÀ» ¹ÞÀº ÈÄ¿¡µµ DatabaseÀÇ ¹°¸®ÀûÀÎ ±¸Á¶°¡ º¯°æµÇÁö ¾Ê¾Ò´Ù¸é ALTER DATABASE BACKUP CONTROL FILE TO TRACE ; command¸¦ »ç¿ëÇϸé Control fileÀ» CreationÇÏ´Â script¸¦ º¸´Ù ½±°Ô ÀÛ¼ºÇÒ ¼ö ÀÖ°Ô ÇØÁØ´Ù. ALTER DATABASE BACKUP CONTROL FILE TO TRACE ; command¸¦ »ç¿ëÇϱâ À§Çؼ± Backup¹ÞÀº Control file ¸ðµÎ¸¦ Physical directory·Î CopyÇØ¾ß ÇÑ´Ù.
¿Ö³ÄÇϸé ÀÌ Command´Â PhysicalÇÑ Control fileÀ» user_dump_dest(config.ora file¿¡¼­ Á¤ÀÇ)ÀÎ/admhome/ oracle/admin/BACKUP/udump·Î ORA_xxxxx.trc¶ó´Â trace fileÀ» »ý¼ºÇϸç ÀÌ trace file¿¡´Â PhysicalÇÑ Control fileÀÌ °¡Áö°í ÀÖ´Â DatabaseÀÇ Structure¿¡ °üÇÑ Á¤º¸¸¦ Åä´ë·Î Control fileÀ» CreationÇÏ´Â Script°¡ ¸¸µé¾îÁø´Ù.
¼³·É Control fileÀ» Backup¹ÞÀº ÈÄ¿¡ DatabaseÀÇ ¹°¸®ÀûÀÎ ±¸Á¶°¡ º¯°æµÇ¾ú´Ù¸é Backup¹ÞÀº Control fileÀ» CopyÇÏ°í ALTER DATABASE BACKUP CONTROL FILE TO TRACE ; ¸¦ ½Ç ÇàÇÑ ÈÄ /admhome/oracle/admin/BACKUP/udump¹Ø¿¡ »ý¼ºµÈ Trace file¿¡ DatabaseÀÇ º¯°æµÈ ºÎºÐÀ» Ãß°¡ ȤÀº »èÁ¦ÇÏ¿© SHUTDOWN ABORTÇÑ ÈÄ¿¡ ½ÇÇà½ÃÅ°¸é Recovery°¡ ¼öÇàµÉ °ÍÀÌ´Ù.

SVRMGR> shutdown abort
ORACLE instance shut down.

4. À§¿¡¼­ ÀÛ¼ºÇÑ script¸¦ ½ÇÇà½ÃÄÑ Control fileÀ» CreationÇÏ°í Recovery¸¦ ¼öÇàÇØ¾ß ÇÑ´Ù.

SVRMGR> @create_contolfile.sql
Statement processed.
Media recovery complete.
Statement processed.
Statement processed.

5. Control fileÀÌ CreationµÇ¾ú´ÂÁö physical directory¿¡¼­ È®ÀÎÇغ»´Ù.

$ ls -l /u02/ORACLE/BACKUP
-rw-r----- 1 oracle dba 111104 Oct 18 11:34 ctrl1BACKUP.ctl
-rw-r----- 1 oracle dba 111104 Oct 18 11:34 ctrl2BACKUP.ctl
-rw-r----- 1 oracle dba 111104 Oct 18 11:34 ctrl3BACKUP.ctl

6. DatafileÀ» Ãß°¡ÇÏ¿© Database°¡ Á¤»óÀûÀ¸·Î Recovery µÇ¾ú´ÂÁö È®ÀÎÇØ º¼ ¼ö ÀÖ´Ù.

2. Control file Áß ÀϺΰ¡ ¼Õ»óµÈ °æ¿ìÀÇ Recovery

oerr ora 210
00210, 00000, "cannot open control file ''%s''"
*Cause: Cannot open the control file
*Action: Check to make sure the control file is there and not locked by some other program

Çö»ó ¹× Error ³»¿ë

À§ CASE 2-1°ú °°Àº Error¸¦ Return ÇÒ °ÍÀÌ´Ù.

SQL> alter tablespace users add Datafile ''/u02/ORACLE/BACKUP/usr2BACKUP.dbf'';
alter tablespace users add Datafile ''/u02/ORACLE/BACKUP/usr2BACKUP.dbf''
*
ERROR at line 1:
ORA-00210: cannot open control file ''/u02/ORACLE/BACKUP/ctrl1BACKUP.ctl''
ORA-07368: sfofi: open error, unable to open database file.
IBM AIX RISC System/6000 Error: 2: No such file or directory

Recovery ¼öÇà ¹æ¹ý

1. Physical directory¿¡¼­ mirroring µÇ°í ÀÖ´Â Control fileÀ» CopyÇÑ´Ù.

$ cp /u02/ORACLE/BACKUP/ctrl2BACKUP.ctl ctrl1BACKUP.ctl

2. IMMEDIATE·Î ShutdownÇÑ´Ù.

SVRMGR> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.

3. STRATUP ÇÑ´Ù.

SVRMGR> startup
ORACLE instance started.
Database mounted.
Database opened.

À§¿Í °°ÀÌ Test°á°ú RecoveryµÈ´Ù. MirroringµÇ°íÀÖ´ÂControl file Áß ÀϺΰ¡ ¼Õ»óÀ» ÀÔ¾î DatabaseÀÇ ¹°¸®Àû ±¸Á¶¸¦ º¯È­½ÃÅ°Áö ¸øÇÏ¿© Error¸¦ Return ÇÒ ¶§ MirroringµÇ°í ÀÖ´Â Control fileÀ» Physical directory¿¡ CopyÇÏ°í NORMAL·Î SHUTDOWNÇÑ ÈÄ ´Ù½Ã STARTUPÇÏ¸é ¼Õ»óµÈControl fileÀ» RecoveryÇÒ ¼ö ÀÖ´Ù. ±×·¯³ª ORACLE Mannual¿¡´Â ABORT·Î SHUTDOWNÇ϶ó°í ¸í½ÃÇÏ°í ÀÖ´Ù. ±×¸®°í Mannual¿¡´Â 1°ú 2¸¦ ¹Ù²ã ¼öÇàÇ϶ó°í ±â¼úµÇ¾î ÀÖÁö¸¸ µÎ °¡Áö °æ¿ì ¸ðµÎ Recovery´Â Á¤»óÀûÀ¸·Î µÈ´Ù.

´Ù¸¥ Recovery ¹æ¹ý(ORACLE Mannual)

1. ABORT·Î SHUTDOWNÇÑ´Ù.

SVRMGR> shutdown ABORT
Database closed.
Database dismounted.
ORACLE instance shut down.

2. Physical directory¿¡¼­ mirroring µÇ°í ÀÖ´Â Control fileÀ» CopyÇÑ´Ù.

$ cp /u02/ORACLE/BACKUP/ctrl2BACKUP.ctl ctrl1BACKUP.ctl

3. STRATUP ÇÑ´Ù.

SVRMGR> startup
ORACLE instance started.
Database mounted.
Database opened.

2.4.3 ¿Â¶óÀÎ Log(Redo Log)ÀÇ ¼Õ»ó ½Ã º¹±¸ ÀýÂ÷

1. Mirrored µÇ´Â Redolog file GroupÁß Æ¯Á¤ memberÀÇ Recovery
(Current redo log GroupÀÌ ¾Æ´Ñ GroupÀÇ member°¡ ¼Õ»óµÈ °æ¿ì, Current redo log GroupÀÇ member°¡ ¼Õ»óµÈ °æ¿ì °øÅë)

cf) ÇöÀç log fileÀÇ »óÅÂ

SVRMGR> select * from v$log;

GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS
------ ------- --------- ------- -------- ---
1 1 136 10240 2 YES INACTIVE
2 1 137 10240 2 NO CURRENT

2 rows selected.

Çö»ó ¹× Error ³»¿ë

SQL> insert into bonus
2 select * from bonus;

736 rows created.

SQL>select count(*) from bonus
COUNT(*)
----------
1472

SVRMGR> select GROUP#,THREAD#,SEQUENCE#,BYTES, MEMBERS, ARCHIVED,STATUS
2> from v$log;

GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS
------ -------- ----------- ----- -------- ---
1 1 146 10240 2 NO CURRENT
2 1 145 10240 2 YES INACTIVE

2 rows selected.

Log Group¿¡¼­ °¢ Group¿¡ ÃÖ¼ÒÇÑ 1°³ÀÇ MirroringµÇ°í ÀÖ´Âlog fileÀÌ ÀÖ´Ù¸é Log »óÅ°¡ CURRENTÀ̵ç INACTIVEÀÌµç »ó°ü¾øÀÌ log file member°¡ ¼Õ»óÀ» ÀÔ¾úÀ»Áö¶óµµ ORACLEÀÇ background processÀÎ LGWRÀº ¼Õ»óµÈ log fileÀÌ¿Ü ÀÇ ´Ù¸¥ log file member¸¦ ã¾Æ WriteÇϹǷΠº°µµÀÇ Error¸¦ ReturnÇÏÁö ¾Ê°í Á¤»óÀûÀ¸·Î Database°¡ ÀÛµ¿Çϵµ·Ï ÇÑ´Ù. ´Ù¸¸ LGWR Trace fileÀ̳ª ALERT file¿¡ Error message¸¦ ³²±ä´Ù.

Recovery ¼öÇà ¹æ¹ý

1. V$LOG¿¡¼­ ¼Õ»óµÈ log file memberÀÇ »óÅ°¡ Current°¡ ¾Æ´ÑÁö¸¦ È®ÀÎÇÑ´Ù. ¸¸¾à Current»óŶó¸é ÀÎÀ§ÀûÀ¸·Î Log Switch¸¦ ´Ù¸¥ GroupÀ¸·Î ³Ñ°Ü INACTIVE »óÅ·Π¸¸µé¾î¾ß ¼Õ»óµÈ log fileÀ» DROPÇÒ ¼ö ÀÖ°í ´Ù½Ã ADDÇÒ ¼ö ÀÖ´Ù.

SVRMGR> alter system switch logfile;
Statement processed.

SVRMGR> select GROUP#,THREAD#,SEQUENCE#,BYTES, MEMBERS,ARCHIVED,STATUS
2> from v$log;

GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS
------ -------- --------- ------ -------- ----
1 1 145 10240 2 YES INACTIVE
2 1 146 10240 2 NO CURRENT

2. ¼Õ»óµÈ log fileÀ» DROPÇÑ´Ù.

SVRMGR> alter database drop logfile member ''/u02/ORACLE/BACKUP/log1BACKUP.dbf'';
Statement processed.
SVRMGR> select * from v$logfile;

GROUP# MEMBER
--------- -------------------------
2 /u02/ORACLE/BACKUP/log2BACKUP.dbf
2 /u02/ORACLE/BACKUP/log2_m_BACKUP.dbf
1 /u02/ORACLE/BACKUP/log1_m_BACKUP.dbf

3rows selected.

3. ´Ù½Ã log member¸¦ Ãß°¡ÇÑ´Ù.

SVRMGR> alter database add logfile member ''/u02/ORACLE/BACKUP/log1BACKUP.dbf''
2> to group 1;

Statement processed.

SVRMGR> select * from v$logfile;

GROUP# STATUS MEMBER
--------- -----------------------------------
2 /u02/ORACLE/BACKUP/log2BACKUP.dbf
2 /u02/ORACLE/BACKUP/log2_m_BACKUP.dbf
1 INVALID /u02/ORACLE/BACKUP/log1BACKUP.dbf
1 /u02/ORACLE/BACKUP/log1_m_BACKUP.dbf

4 rows selected.

À§¿Í °°ÀÌ Log file Group¿¡¼­ MemberÀϺΰ¡ ¼Õ»óÀ» ÀÔ¾úÀ» °æ¿ì¿¡´Â À§¿Í °°ÀÌ °£´ÜÈ÷ Recovery ÇÒ ¼ö ÀÖ´Ù.

2 Mirrored µÇ´Â Redolog file GroupÁß Æ¯Á¤ GroupÀÇ Recovery

(Current Online Redolog GroupÀÌ ¾Æ´Ñ °æ¿ì)

ORA-1096À» ReturnÇÏ´Â °æ¿ì¿¡´Â ¾Æ·¡ÀÇ Recovery ¼öÇà ¹æ¹ýÀ» ÅëÇØ RecoveryÇÑ´Ù.
oerr ora 1092
01092, 00000, "ORACLE instance terminated. Disconnection forced"
*Cause:The instance this process was connected to was terminated abnormally, probably via a shutdown abort. This process was forced to disconnect from the instance.
*Action: When instance has been restarted, retry action.

Çö»ó ¹× Error ³»¿ë

SQL> insert into bonus values(''wwew'',''qeq'',1122,22222);
1 row created.

SQL> /
1 row created.

SQL> /
insert into bonus
*
ERROR at line 1:
ORA-01092: ORACLE instance terminated. Disconnection forced

Current Log GroupÀÌ ¾Æ´Ñ ´ÙÀ½ Log Switch°¡ ÀϾ GroupÀÌ ¼Õ»óµÈ °æ¿ì User´Â °è¼ÓÇؼ­ DMLÀÛ¾÷À» °è¼ÓÇÒ °ÍÀÌ´Ù. ÀϹÝÀûÀ¸·Î SGA¾ÈÀÇ Log Buffer°¡ ´Ù Â÷¸é Current Log Group ¿¡ WriteÇÏ°í Log Switch¸¦ ´ÙÀ½ Log GroupÀ¸·Î ³Ñ±â°í ²Ë Âù Current Log fileÀÇ ³»¿ëÀ» Archive log file¿¡ ½á¾ß ÇÑ´Ù. ±×·¯³ª ´ÙÀ½ Log Switch°¡ ³Ñ¾î°¥ GroupÀÌ ¼Õ»óµÇ¾î ÀÖÀ¸¹Ç·Î Log Switch°¡ ³Ñ¾î°¡Áö¸¦ ¸øÇÑ´Ù. ±×¸®°í Current Log GroupÀº LGWRÀÌ Log BufferÀÇ ³»¿ëÀ» WriteÇßÀ¸¹Ç·Î ²ËáÁö¸¸ Archive ´Â ¾ÆÁ÷ ¼öÇàÇÏÁö ¸øÇÏ°í ÀÖ´Â »óÅÂÀÌ´Ù.
ÀÌó·³ ´ÙÀ½ Log Switch°¡ ÀϾ GroupÀÌ ¼Õ»óµÈ °æ¿ì ORACLEÀº Background processÀÎ LGWR¸¦ °­Á¦·Î terminate ½ÃÅ°°í Trace file¿¡ ±â·ÏÀ» ³²±ä´Ù.

$ls -la /admhome/oracle/admin/BACKUP/bdump
-rw-r--r-- 1 oracle dba 27107 Oct 19 15:53 alert_BACKUP.log
-rw-r----- 1 oracle dba 1131 Oct 19 15:58 lgwr_44568.trc
-rw-r----- 1 oracle dba 682 Oct 19 15:58 pmon_28172.trc

$ vi /admhome/oracle/admin/BACKUP/bdump/ pmon_28172.trc

Sat Oct 19 15:58:21 1996
*** SESSION ID:(1.1) 1996.10.19.15.58.21.959
error 470 detected in background process
OPIRIP: Uncaught error 447. Error stack:
ORA-00447: fatal error in background process
ORA-00470: LGWR process terminated with error

$ vi /admhome/oracle/admin/BACKUP/bdump/ lgwr_44568.trc

*** SESSION ID:(4.1) 1996.10.19.15.50.06.574
ORA-00313: open failed for members of log group 1 of thread 1
ORA-00312: online log 1 thread 1: ''/u02/ORACLE/BACKUP/log1BACKUP.dbf''
ORA-07360: sfifi: stat error, unable to obtain information about file.
IBM AIX RISC System/6000 Error: 2: No such file or directory
ORA-00312: online log 1 thread 1: ''/u02/ORACLE/BACKUP/log1_m_BACKUP.dbf''
ORA-07360: sfifi: stat error, unable to obtain information about file.
IBM AIX RISC System/6000 Error: 2: No such file or directory
Sat Oct 19 15:53:12 1996
ORA-00313: open failed for members of log group 1 of thread 1
Sat Oct 19 15:58:21 1996
error 313 detected in background process

Recovery ¼öÇà ¹æ¹ý

1. PMONÀº Background processÀÎ LGWR¸¦ °­Á¦·Î kill ½ÃÅ°°í Terminate ½ÃÅ°¹Ç·Î ABORT OptionÀ¸·Î SHUTDOWN ½ÃŲ´Ù.

SVRMGR> shutdown abort
ORACLE instance shut down.

2. ÀÏ´Ü NORMAL·Î STARTUPÇÏ¿© ERROR¸¦ CheckÇÑ´Ù.

SVRMGR> startup
ORACLE instance started.
Database mounted.

ORA-00313: open failed for members of log group 2 of thread 1
ORA-00312: online log 2 thread 1: ''/u02/ORACLE/BACKUP/log2_m_BACKUP.dbf''
ORA-00312: online log 2 thread 1: ''/u02/ORACLE/BACKUP/log2BACKUP.dbf''

SVRMGR> !oerr ora 313
00313, 00000, "open failed for members of log group %s of thread %s"
*Cause: The online log cannot be opened. May not be able to find file.
*Action: See accompanying errors and make log available.

SVRMGR> select * from v$log;

GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS
------- ------ ---------- ----- ---------
1 1 156 10240 2 NO CURRENT
2 1 0 10240 2 YES UNUSED

2 rows selected.

SVRMGR> select * from v$logfile;

GROUP# STATUS MEMBER
---------- ------- ---------------------------
2 STALE /u02/ORACLE/BACKUP/log2BACKUP.dbf
2 STALE /u02/ORACLE/BACKUP/log2_m_BACKUP.dbf
1 /u02/ORACLE/BACKUP/log1BACKUP.dbf
1 /u02/ORACLE/BACKUP/log1_m_BACKUP.dbf

3. ÀÓÀÇÀÇ Log GroupÀ» AddÇÑ´Ù.

SVRMGR> alter database add logfile ''/u02/ORACLE/BACKUP/log3.dbf'' size 10k;
Statement processed.

4. ¼Õ»óµÈ Log GroupÀ» DROPÇÑ´Ù.

SVRMGR> alter database drop logfile group 2;
Statement processed.

5. ´Ù½Ã ¼Õ»óµÈ Log Group°ú °°Àº Size, NameÀ¸·Î ADDÇÑ´Ù.

SVRMGR> alter database add logfile ''/u02/ORACLE/BACKUP/log2BACKUP.dbf'' size 10k;
Statement processed.

SVRMGR> alter database add logfile member ''/u02/ORACLE/BACKUP/log2_m_BACKUP.dbf''
2> to group 2;
Statement processed.

SVRMGR> select * from v$log;
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS
------- ------ ----------- ----- -------------
1 1 156 10240 2 NO CURRENT
2 1 0 10240 2 YES UNUSED
3 1 0 10240 1 YES UNUSED

3 rows selected.

6. ÀÓÀÇ·Î »ý¼ºÇß´ø Log GroupÀ» DROPÇÑ´Ù.

SVRMGR> alter database drop logfile group 3;
Statement processed.

7. Database¸¦ OPENÇÑ´Ù.

SVRMGR> alter database open;
Statement processed.

SVRMGR> alter system switch logfile;
Statement processed.

SVRMGR> select * from v$log;
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS
------- ------ ----------- ---- --------------
1 1 156 10240 2 NO CURRENT
2 1 157 10240 2 YES INACTIVE

2 rows selected.

SVRMGR> select * from v$logfile;
GROUP# STATUS MEMBER
-------- ------- -----------------------------
2 /u02/ORACLE/BACKUP/log2BACKUP.dbf
2 /u02/ORACLE/BACKUP/log2_m_BACKUP.dbf
1 /u02/ORACLE/BACKUP/log1BACKUP.dbf
1 /u02/ORACLE/BACKUP/log1_m_BACKUP.dbf

4 rows selected.

8. ¸¶Áö¸·À¸·Î ÀÓÀÇ·Î »ý¼ºÇß´ø PhysicalÇÑ Log fileÀ» RemoveÇÑ´Ù.

$ rm /u02/ORACLE/BACKUP/log3.dbf

3 Mirrored µÇ´Â Redolog file GroupÁß Æ¯Á¤ GroupÀÇ Recovery

(Current Online Redo log GroupÀÎ °æ¿ì)
DML(Data Manipulation Language) Áï, Insert, Delete, Updateµî À» ½ÇÇà ½ÃÄ״µ¥ ¾Æ¹«·± °á°ú¸¦ ReturnÇÏÁö ¾Ê°í °è¼Ó ¹¬¹¬ºÎ ´äÀÏ ¶§¿¡´Â ´Ù¸¥ SessionÀ» ¿­¾î Alert_ORACLE_SID.oraÀ» È®ÀÎ ÇÏ¿© Database¿¡ ¾î¶² ¹®Á¦°¡ ¹ß»ýÇÑ °ÍÀº ¾Æ´Ñ Áö È®ÀÎ Çغ¸´Â ÀÚ¼¼°¡ Áß¿äÇÏ´Ù.

Çö»ó ¹× Error ³»¿ë

SQL> insert into bonus
2 select * from bonus;

10 rows created.

SQL> /
===> ¹«¹ÝÀÀ

ÇöÀç Current log GroupÀÌ ÀüºÎ ¼Õ»óµÈ ½ÃÁ¡¿¡ ORACLEÀº Ưº°ÇÑ Error Message¸¦ ReturnÇÏÁö ¾Ê°í ´Ù¸¸ /admhome/oracle/admin/BACKUP/bdump¿¡ ALERT fileÀ̳ª arch_xx.trc file¿¡ Error Message¸¦ ³²±ä´Ù. ¿©±â¼­ arch_xx.trc fileÀ» º¸¸é ,

ORA-00255: error archiving log 1 of thread 1, sequence # 169
ORA-00312: online log 1 thread 1: ''/u02/ORACLE/BACKUP/log1BACKUP.dbf''
ORA-00312: online log 1 thread 1: ''/u02/ORACLE/BACKUP/log1_m_BACKUP.dbf''
ORA-00286: No members available, or no member contains valid data
ORA-00334: archived log: ¡®/adhome/oracle/admin/BACKUP/arch/arch_169.arc

À§ÀÇ Error¸¦ Return ÇÔÀ» ¾Ë ¼ö ÀÖ´Ù. ƯÈ÷ ORA-286À» º¸¸é ¾Ë ¼ö ÀÖµíÀÌ Current log GroupÀÌ ¾øÀ½À» ¾Ë ¼ö ÀÖ°í Log fileÀÌ ¾øÀ¸¹Ç·Î ArchiveÇÒ Data°¡ ¾ø´Ù°í Message¸¦ ³²±ä´Ù.

00286, 00000, "No members available, or no member contains valid data"
*Cause: None of the members of a logfile group are available, or the available members do not contain complete data.
*Action: If a member is temporarily offline, attempt to make it available.Make sure that the correct file names are being used, especially if the log is being accessed from a remote location.

SGA¾ÈÀÇ Log buffer°¡ ²ËÂ÷¼­ LGWR°¡ Redo log Buffer¾ÈÀÇ ³»¿ëÀ» Current Log file¿¡ writeÇÏ·Á°í ÇÏÁö¸¸ Log fileÀÌ ¼Õ»óµÇ¾î ÀÖÀ¸¹Ç·Î writeÇÏÁö ¸øÇÑ´Ù. À̶§ ORACLEÀº ³»ºÎÀû ¾Ë°í¸®Áò¿¡ ÀÇÇØ LGWR°¡ ¼Õ»óµÈ Current Log file¿¡ Redo log bufferÀÇ ³»¿ëÀ» writeÇÏÁö ¸øÇß´õ¶óµµ ´Ù¸¥ Á¤»óÀûÀÎ Log GroupÀ¸·Î Log Switch¸¦ ³Ñ±ä´Ù. ±×·¯³ª ÇöÀç ¼Õ»óµÈ Current log file¿¡ writeÇÑ °ÍÀÌ ¾øÀ¸¹Ç·Î Current log fileÀÇ °ÍÀ» Archive file·Îµµ ³²±æ ¼ö ¾ø´Ù. ´ÙÀ½ÀÇ V$LOG¿¡¼­ ³ªÅ¸³ªµíÀÌ ¼Õ»óµÈ Current GroupÀ̾ú´ø Group # 1ÀÇ STATUS´Â INACTIVEÀÌ°í Archive´Â ¾ÈµÇ¾úÀ½À» ¾Ë ¼ö ÀÖ´Ù.
¡×ÁÖÀÇ ÇÒ Á¡Àº À§Ã³·³ Current Log GroupÀÌ ¼Õ»óÀ» ÀÔ¾úÀ» ¶§´Â ORACLEÀº ¾Æ¹«·± Message¸¦ ³»º¸³»Áö ¾Ê´Â´Ù´Â °ÍÀÌ ´Ù. ±×·¯¹Ç·Î À§¿¡¼­Ã³·³ DML¿¡ ¾Æ¹«·± ¹ÝÀÀÀÌ ¾øÀ» ¶§´Â Current Log GroupÀÌ ¼Õ»óµÇÁö ¾Ê¾Ò³ª CheckÇØ º¸´Â °ÍÀÌ ¹Ù¶÷Á÷ÇÏ´Ù.

Recovery ¼öÇà ¹æ¹ý

1. ÀÏ´Ü DML¿¡ ´ëÇÑ ¾Æ¹«·± ¹ÝÀÀÀÌ ¾ø¾úÀ¸¹Ç·Î Alert fileÀ̳ª ÇöÀç½Ã°£¿¡ »ý¼ºµÈ Trace fileÀ» »ìÆ캻´Ù. Trace fileÀÇ ³»¿ëÀÌ Log file°ú ¿¬°üÀÌ ÀÖ´Â °ÍÀ̶ó¸é V$LOG¸¦ È®ÀÎÇØ º»´Ù.

SVRMGR> select * from v$log;
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS
------- ------ ----------- ------ -------- ---
1 1 158 10240 2 NO INACTIVE
2 1 159 10240 2 NO CURRENT

2 rows selected.

À§¿¡¼­ È®ÀÎÇÑ °Íó·³ Group # 1ÀÇ ARCHIVE°¡ ¾È ÀϾ°í Group 2·Î Log Switch°¡ ³Ñ¾î°¬À½À» ¾Ë ¼ö ÀÖ´Ù.

2. ÀÓÀÇÀÇ Log GroupÀ» »ý¼ºÇÑ´Ù. ¿Ö³ÄÇÏ¸é ¼Õ»óµÈ Log Group À» ¾ø¾Ö°í »õ·Î ¸¸µå´Â °úÁ¤¿¡¼­ ORACLE¿¡¼­´Â ¹Ýµå½Ã Log GroupÀÌ 2°³ ÀÌ»ó(Circular fashion)À̾î¾ß ÇÑ´Ù. ±×·¯¹Ç·Î GROUP 1À» DROPÇÏ´Â ½ÃÁ¡¿¡ Log GroupÀº 2°³ ÀÌ»óÀÌ Á¸Àç ÇØ¾ß ÇϹǷΠÀÓÀÇÀÇ Log Group 3¸¦ »ý¼ºÇØ¾ß ÇÑ´Ù.

SVRMGR> alter database add logfile ''/u02/ORACLE/BACKUP/log3.dbf'' size 10k;
Statement processed.

SVRMGR> select * from v$log;
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS
-------- ------ ---------- ---- --------- ---
1 1 158 10240 2 NO INACTIVE
2 1 159 10240 2 NO CURRENT
3 1 0 10240 1 YES UNUSED

3 rows selected.

3. ¼Õ»óµÉ Log GroupÀ» DROPÇØ¾ß ÇÑ´Ù. ±×·¯³ª ÇöÀç Database´Â ARCHIVELOG Mode·Î ¿î¿µµÇ°í ÀÖ´Ù. ARCHIVELOG Mode¿¡¼­´Â Archive°¡ µÇÁö¾ÊÀº Current Log fileÀ» DROPÇÒ ¼ö ¾ø´Ù. ±×·¯¹Ç·Î ¼Õ»óµÈ Log GroupÀ» DROPÇÏ ±â¿¡ ¾Õ¼­ Database¸¦ NOARCHIVELOG Mode·Î º¯°æ½ÃÄÑÁÖ¾î ¾ß ÇÑ´Ù.

SVRMGR> alter database drop logfile group 1;
alter database drop logfile group 1
ORA-00350: log 1 of thread 1 needs to be archived
ORA-00312: online log 1 thread 1: ''/u02/ORACLE/BACKUP/log1BACKUP.dbf''
ORA-00312: online log 1 thread 1: ''/u02/ORACLE/BACKUP/log1_m_BACKUP.dbf''

SVRMGR> shutdown immediate
ORACLE instance shut down.
SHUTDOWN ÇßÀ¸¸é STARTUP MOUNTÇÑ´Ù.

SVRMGR> startup mount
ORACLE instance started.
Database mounted.

SVRMGR> alter database noarchivelog;
Statement processed.

SVRMGR> archive log list
Database log mode No Archive Mode
Automatic archival Enabled
Archive destination /admhome/oracle/admin/BACKUP/arch
Oldest online log sequence 158
Current log sequence 159

4. ¼Õ»óµÈ Log GroupÀ» DROPÇÑ´Ù.

SVRMGR> alter database drop logfile group 1;
Statement processed.

SVRMGR> select * from v$log;
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS
------- ------ ---------- ------- -------- ---
2 1 159 10240 2 NO CURRENT
3 1 0 10240 1 YES UNUSED

2 rows selected.

5. »õ·Î Log GroupÀ» »ý¼ºÇÑ´Ù.

SVRMGR> alter database add logfile ''/u02/ORACLE/BACKUP/log1BACKUP.dbf'' size 10k;
Statement processed.

SVRMGR> alter database add logfile member ''/u02/ORACLE/BACKUP/log1_m_BACKUP.dbf''
2> to group 1;
Statement processed.

SVRMGR> select * from v$logfile;
GROUP# STATUS MEMBER
---------- ------- ---------------------------
2 STALE /u02/ORACLE/BACKUP/log2BACKUP.dbf
2 STALE /u02/ORACLE/BACKUP/log2_m_BACKUP.dbf
1
/u02/ORACLE/BACKUP/log1BACKUP.dbf
1 INVALID /u02/ORACLE/BACKUP/log1_m_BACKUP.dbf
3
/u02/ORACLE/BACKUP/log3.dbf

5 rows selected.

6. ÀÓÀÇ·Î »ý¼ºÇß´ø Log Group À» DROP ÇÑ´Ù.

SVRMGR> alter database drop logfile group 3;
Statement processed.

SVRMGR> select * from v$log;
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS
------- --------- ------------ ---------- ---
1 1 0 10240 2 YES UNUSED
2 1 159 10240 2 NO CURRENT

2 rows selected.

SVRMGR> select * from v$logfile;
GROUP# STATUS MEMBER
---------- ------- ---------------------------
2 STALE /u02/ORACLE/BACKUP/log2BACKUP.dbf
2 STALE /u02/ORACLE/BACKUP/log2_m_BACKUP.dbf
1
/u02/ORACLE/BACKUP/log1BACKUP.dbf
1 INVALID /u02/ORACLE/BACKUP/log1_m_BACKUP.dbf

4 rows selected.

7. NOARCHIVE Mode¸¦ ´Ù½Ã ARCHIVELOG Mode·Î ¹Ù²Û´Ù.

SVRMGR> alter database archivelog;
Statement processed.

8. Database¸¦ OPENÇÑ´Ù.

SVRMGR> alter database open;
Statement processed.

9. Physical Storage directory¿¡¼­ ÀÓÀÇ·Î »ý¼ºÇß´ø log fileÀ» RemoveÇÑ´Ù.

$ rm /u02/ORACLE/BACKUP/log3.dbf

4. Redo log fileÀÌ ¸ðµÎ ¼Õ»óµÈ °æ¿ì

Recovery ¼öÇà ¹æ¹ý

SystemÀÌ ShutdownµÇ±â Àü¿¡ º¹±¸ÇØ¾ß ÇÔ.

SQL> insert into bonus
2 select * from bonus;

1280 rows created. (ÃÑ 2560row Á¸Àç)

SVRMGR> select * from v$log;
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS FIR
---------- ---------- ---------- ---------- ---------- --- ---------------- ----
1 1 1 4194304 2 NO CURRENT
2 1 0 4194304 2 YES UNUSED

SVRMGR> alter database add logfile group 3
''/u01/ORACLE/BACKUP/log3BACKUP.dbf'' size 1m;
Statement processed.

SVRMGR> alter database drop logfile group 2;
Statement processed.

SVRMGR> alter database add logfile group 2
''/u01/ORACLE/BACKUP/log2BACKUP.dbf'' size 4m;
Statement processed.

SVRMGR> alter database add logfile member
''/u01/ORACLE/BACKUP/log2_m_BACKUP.dbf'' to group 2;
Statement processed.

SVRMGR> select * from v$log;
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS FIR
---------- ---------- ---------- ---------- --
1 1 1 4194304 2 NO CURRENT
2 1 0 4194304 2 YES UNUSED
3 1 0 1048576 1 YES UNUSED
3 rows selected.

SVRMGR> alter database drop logfile group 1;
alter database drop logfile group 1

ORA-01623: log 1 is current log for thread 1 - cannot drop
ORA-00312: online log 1 thread 1: ''/u01/ORACLE/BACKUP/log1BACKUP.dbf''
ORA-00312: online log 1 thread 1: ''/u01/ORACLE/BACKUP/log1_m_BACKUP.dbf''

SVRMGR> alter system switch logfile;
Statement processed.

SVRMGR> select * from v$log;
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS FIR
---------- ---------- ---------- ---------- --
1 1 1 4194304 2 NO INACTIVE
2 1 2 4194304 2 NO CURRENT
3 1 0 1048576 1 YES UNUSED

3 rows selected.

SVRMGR> alter database drop logfile group 1;
alter database drop logfile group 1
*
ORA-00350: log 1 of thread 1 needs to be archived
ORA-00312: online log 1 thread 1: ''/u01/ORACLE/BACKUP/log1BACKUP.dbf''
ORA-00312: online log 1 thread 1: ''/u01/ORACLE/BACKUP/log1_m_BACKUP.dbf''

SVRMGR> shutdown abort

SVRMGR> startup mount

SVRMGR> alter database noarchivelog;
Statement processed.

SVRMGR> alter database drop logfile group 1;
Statement processed.

SVRMGR> alter database add logfile group 1
2> ''/u01/ORACLE/BACKUP/log1BACKUP.dbf'' size 4m;
Statement processed.

SVRMGR> alter database add logfile member
2> ''/u01/ORACLE/BACKUP/log1_m_BACKUP.dbf'' to group 1;
Statement processed.

SVRMGR> alter database drop logfile group 3;
Statement processed.
SVRMGR> alter database open;
SVRMGR> shutdown
SVRMGR> startup mount
SVRMGR> alter database archivelog;
Statement processed.

SVRMGR> alter database open;
Statement processed.

SVRMGR> connect scott/tiger
Connected.

SVRMGR> select count(*) from bonus;
COUNT(*)
----------
2560

1 row selected.

2.3.4 ±âŸ Àå¾Ö À¯Çüº° º¹±¸ ÀýÂ÷.

Case 1. Online Tablespace backup Á÷ÈÄ failure°¡ ¹ß»ýÇÑ °æ¿ì (End Backup command¸¦ ¾ÆÁ÷ ¼öÇàÇÏÁö ¸øÇÑ °æ¿ì)


Recovery ¼öÇà ¹æ¹ý

SVRMGR> select * from v$backup;
FILE# STATUS CHANGE# TIME
------ ------ -------- ----------------------
1 ACTIVE 6559 10/12/96 13:53:16
2 ACTIVE 6560 10/12/96 13:53:16
3 ACTIVE 6562 10/12/96 13:53:16
4 ACTIVE 6561 10/12/96 13:53:16
5 ACTIVE 6563 10/12/96 13:53:16


ACTIVE´Â backup modeÁß ÀÓÀ» ¶æÇÑ´Ù.

SVRMGR> shutdown abort
ORACLE instance shut down.

SVRMGR> startup
ORACLE instance started.
Total System Global Area 4953044 bytes
Fixed Size 38940 bytes
Variable Size 4078520 bytes
Database Buffers 819200 bytes
Redo Buffers 16384 bytes
Database mounted.
ORA-01113: file 1 needs media recovery
ORA-01110: data file 1: ''/u01/ORACLE/BACKUP/systBACKUP.dbf''

SVRMGR> recover Datafile ''/u01/ORACLE/BACKUP/systBACKUP.dbf'';
Media recovery complete.
ORA-01113: file 2 needs media recovery
ORA-01110: data file 2: ''/u01/ORACLE/BACKUP/rbsBACKUP.dbf''

SVRMGR> recover Datafile ''/u01/ORACLE/BACKUP/rbsBACKUP.dbf'';
Media recovery complete.

SVRMGR> alter database open;
alter database open
*
ORA-01113: file 3 needs media recovery
ORA-01110: data file 3: ''/u01/ORACLE/BACKUP/tempBACKUP.dbf''

SVRMGR> recover Datafile ''/u01/ORACLE/BACKUP/tempBACKUP.dbf''
Media recovery complete.

SVRMGR> alter database open;
ORA-01113: file 4 needs media recovery
ORA-01110: data file 4: ''/u01/ORACLE/BACKUP/toolBACKUP.dbf''

SVRMGR> recover Datafile ''/u01/ORACLE/BACKUP/toolBACKUP.dbf''
Media recovery complete.

SVRMGR> alter database open;
alter database open
*
ORA-01113: file 5 needs media recovery
ORA-01110: data file 5: ''/u01/ORACLE/BACKUP/usrBACKUP.dbf''

SVRMGR> recover Datafile ''/u01/ORACLE/BACKUP/usrBACKUP.dbf'';
Media recovery complete.

SVRMGR> alter database open;
Statement processed.

SVRMGR> select * from v$backup;
FILE# STATUS CHANGE# TIME
---------- ------------------ ---------- --------------------
1 NOT ACTIVE 6559 10/12/96 13:53:16
2 NOT ACTIVE 6560 10/12/96 13:53:16
3 NOT ACTIVE 6562 10/12/96 13:53:16
4 NOT ACTIVE 6561 10/12/96 13:53:16
5 NOT ACTIVE 6563 10/12/96 13:53:1

Recovery ¼öÇà ¹æ¹ý

SVRMGR> startup mount
ORACLE instance started.
Total System Global Area 4953044 bytes
Fixed Size 38940 bytes
Variable Size 4078520 bytes
Database Buffers 819200 bytes
Redo Buffers 16384 bytes
Database mounted.

SVRMGR> alter database Datafile ''/u01/ORACLE/BACKUP/systBACKUP.dbf'' end backup;
Statement processed.

SVRMGR> alter database Datafile ''/u01/ORACLE/BACKUP/rbsBACKUP.dbf'' end backup;
Statement processed.

SVRMGR> alter database Datafile ''/u01/ORACLE/BACKUP/tempBACKUP.dbf'' end backup;
Statement processed.

SVRMGR> alter database Datafile ''/u01/ORACLE/BACKUP/toolBACKUP.dbf'' end backup;
Statement processed.

SVRMGR> alter database Datafile ''/u01/ORACLE/BACKUP/usrBACKUP.dbf'' end backup;
Statement processed.

SVRMGR> alter database open;
Statement processed.

Case 2. Backupº»ÀÌ ¾ø´Â DatafileÀÌ ¼Õ»ó µÈ °æ¿ì

Recovery ¼öÇà ¹æ¹ý

ÀÓÀÇÀÇ tablespace test3¸¦ ¸¸µê.
±× tablespace¿¡ tableÀ» ¸¸µç´Ù.
DatafileÀ» »èÁ¦ÇÑ´Ù.

SQL> create tablespace TEST Datafile
''/u01/ORACLE/BACKUP/test3.dbf'' size 5m reuse
default storage (
initial 20k
next 20k
pctincrease 50);

SQL> create table chw
2 (a number(2),
3 b varchar2(8),
4 c varchar2(8))
5 tablespace test;
Table created.

SQL> insert into chw
2 values(1,''chw'',''seoul'');
1 row created.

SQL> /
1 row created.

SQL>commit;

$ rm /u01/ORACLE/BACKUP/test3.dbf

Recovery ¼öÇà ¹æ¹ý

SQL> select NAME,STATUS from v$Datafile;
NAME STATUS
----------------------------------- ---------
/u01/ORACLE/BACKUP/systBACKUP.dbf SYSTEM
/u01/ORACLE/BACKUP/rbsBACKUP.dbf ONLINE
/u01/ORACLE/BACKUP/tempBACKUP.dbf ONLINE
/u01/ORACLE/BACKUP/toolBACKUP.dbf ONLINE
/u01/ORACLE/BACKUP/usrBACKUP.dbf ONLINE
/u01/ORACLE/BACKUP/test.dbf ONLINE

SVRMGR> shutdown abort
ORACLE instance shut down.

SVRMGR> startup
ORACLE instance started.
Database mounted.
ORA-01157: cannot identify data file 6 - file not found
ORA-01110: data file 6: ''/u01/ORACLE/BACKUP/test.dbf''

SVRMGR> alter database create Datafile ''/u01/ORACLE/BACKUP/test.dbf'' as
2> ''/u01/ORACLE/BACKUP/test2.dbf'';

SVRMGR> recover tablespace test;
ORA-01109: database not open

SVRMGR> alter database open;
alter database open
*
ORA-01113: file 6 needs media recovery
ORA-01110: data file 6: ''/u01/ORACLE/BACKUP/test2.dbf''

SVRMGR> recover Datafile ''/u01/ORACLE/BACKUP/test2.dbf'';
ORA-00279: Change 6583 generated at 10/12/96 14:22:20 needed for thread 1
ORA-00289: Suggestion : /admhome/oracle/admin/BACKUP/arch/arch_8.arc
ORA-00280: Change 6583 for thread 1 is in sequence #8
Specify log: {=suggested | filename | AUTO | CANCEL}
Log applied.
ORA-00279: Change 6643 generated at 10/14/96 10:47:40 needed for thread 1
ORA-00289: Suggestion : /admhome/oracle/admin/BACKUP/arch/arch_9.arc
ORA-00280: Change 6643 for thread 1 is in sequence #9
ORA-00278: Logfile ''/admhome/oracle/admin/BACKUP/arch/arch_8.arc'' no longer neey
Specify log: {=suggested | filename | AUTO | CANCEL}

Log applied.
ORA-00279: Change 6659 generated at 10/14/96 10:50:58 needed for thread 1
ORA-00289: Suggestion : /admhome/oracle/admin/BACKUP/arch/arch_10.arc
ORA-00280: Change 6659 for thread 1 is in sequence #10
ORA-00278: Logfile ''/admhome/oracle/admin/BACKUP/arch/arch_9.arc'' no longer neey
Specify log: {=suggested | filename | AUTO | CANCEL}

Log applied.
Media recovery complete.

** set auto recovery onÀ¸·Î ¼³Á¤ÇÑ ÈÄ log¸¦ Àû¿ëÇϸé Àû¿ë ½ÃÁ¡±îÁö ÀúÀý·Î applyµÈ´Ù.

SVRMGR> alter database open ;
Statement processed.

Case 3. ƯÁ¤ ½ÃÁ¡À¸·ÎÀÇ Recovery ( Time-Based Recovery)

Çö»ó ¹× Error ³»¿ë

SVRMGR> shutdown
$cp /u01/ORACLE/BACKUP/* /u01/ORACLE/COLD_BACK
SVRMGR> startup
SVRMGR>connect scott/tiger

SVRMGR> insert into bonus
2> select * from bonus;
640 rows processed.

SVRMGR> /
SVRMGR> /
SVRMGR> commit;
Statement processed.

SVRMGR> select count(*) from bonus;
COUNT(*)
----------
1280
1 row selected.

SVRMGR> select to_char(sysdate,''yyyy-mm-dd:hh24:mi:ss'') from dual;
TO_CHAR(SYSDATE,''YYYY-MM-DD:HH24:MI:SS'')
---------------------------------------------------------------------------
1996-10-16:18:37:20
1 row selected.

SVRMGR> truncate table bonus;
Statement processed.

SVRMGR> commit;
Statement processed.

Recovery ¼öÇà ¹æ¹ý

SVRMGR>shutdown abort
$ls /u01/ORACLE/COLD_BACK
ctrl1BACKUP.ctl log1_m_BACKUP.dbf systBACKUP.dbf usrBACKUP.dbf
ctrl2BACKUP.ctl log2BACKUP.dbf tempBACKUP.dbf
ctrl3BACKUP.ctl log2_m_BACKUP.dbf test.dbf
log1BACKUP.dbf rbsBACKUP.dbf toolBACKUP.dbf


Control file°ú Redo log fileÀ» Á¦¿ÜÇÑ DatafileÀ» copyÇÑ´Ù.
¸¸ÀÏ currentÇÑ control fileÀÌ º¹±¸ÇÏ°íÀÚ ÇÏ´Â ½ÃÁ¡ÀÇ databaseÀÇ ¹°¸®Àû ±¸Á¶¿Í ÀÏÄ¡ÇÏÁö ¾Ê´Â´Ù¸é incomplete recovery¸¦ ³¡³»°íÀÚ ÇÏ´Â ½ÃÁ¡ÀÇ databaseÀÇ ¹°¸®Àû file ±¸Á¶¸¦ ¹Ý¿µÇÏ´Â control fileÀÇ backupÀ» restoreÇÑ´Ù.
HardwareÀûÀÎ ¹®Á¦·Î ÀÎÇØ control file backupÀ» ´ëü½Ãų ¼ö ¾ø´Ù¸é control_files¸¦ editÇÒ ¼ö ÀÖ´Ù.
Á¸ÀçÇÏ´Â DatafileÀ» ´ëüÇϱâ À§Çؼ­ »ç¿ëµÇ´Â ¸ðµç backup fileÀº º¹±¸ÇÏ°íÀÚ ÇÏ´Â ½ÃÁ¡ ÀüÀÇ °ÍÀ̾î¾ß ÇÑ´Ù.

$cd /u01/ORACLE/COLD_BACK
$cp rbsBACKUP.dbf systBACKUP.dbf tempBACKUP.dbf test.dbf toolBACKUP.dbf usrBACKUP.dbf /u01/ORACLE/BACKUP

SVRMGR> startup mount


databaseÀÇ ¸ðµç DatafileÀº time-based or change-based recovery ÇÏ´Â µ¿¾È onlineÀ̾î¾ß ÇÔ

SVRMGR> select * from v$Datafile;
FILE# STATUS ENABLED CHECKPOINT BYTES CREATE_BYT NAME
---------- ------- ---------- ---------- -----
1 SYSTEM READ WRITE 6798 52428800 52428800 /u01/ORACLE/BACK
2 ONLINE READ WRITE 6798 41943040 41943040 /u01/ORACLE/BACK
3 ONLINE READ WRITE 6798 52428800 52428800 /u01/ORACLE/BACK
4 ONLINE READ WRITE 6798 10485760 10485760 /u01/ORACLE/BACK
5 ONLINE READ WRITE 6798 10485760 10485760 /u01/ORACLE/BACK


truncate Çϱâ ÀüÀÇ ½Ã°£À¸·Î º¹±¸ÇÑ´Ù.
Control file backupÀ» »ç¿ëÇ߰ųª Àç creationµÈ control fileÀÌ restoreµÇ¾ú´Ù¸é ¡°using backup Control file¡± parameter¸¦ ¸í½ÃÇÑ´Ù.

SVRMGR> recover database until time ''1996-10-16:18:37:00'';
Media recovery complete.


log¸¦ reset½ÃŲ´Ù.

SVRMGR> alter database open resetlogs;
Statement processed.

SVRMGR> connect scott/tiger
Connected.

SVRMGR> select count(*) from bonus;
COUNT(*)
----------
1280
1 row selected

Á¦°ø : DBÆ÷Å»»çÀÌÆ® DBguide.net

'

°ü·Ã±Û : ¾øÀ½ ±Û¾´½Ã°£ : 2007/01/22 17:34 from 218.38.35.251

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