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

±Û¾´ÀÌ: °³¶óŬ backup controfile º¹±¸ ½Ã³ª¸®¿À Á¶È¸¼ö: 7983


using backup controfile º¹±¸ ½Ã³ª¸®¿À



using backup controfile º¹±¸ ½Ã³ª¸®¿À

Èì.. °èȹÇß´ø ¿¡·¯½Ã³ª¸®¿À¿Í Á» ´Ù¸£°Ô °¬Áö¸¸, ÀÌ¿Õ ÇÑ °Å Çѹø ¿Ã·Áº»´Ù.
¿©±â¼­´Â using backup controlfileÀ» »ç¿ëÇÏ´Â º¹±¸ ½Ã³ª¸®¿ÀÀÌ´Ù.
À§ÀÇ ±¸¹®À» »ç¿ëÇϸé DB´Â Ç×»ó resetlogs¿É¼ÇÀ¸·Î open½ÃÄÑ¾ß ÇÑ´Ù.
¾Æ·¡ÀÇ ¿¹¿¡¼­ ¿¡·¯¸¦ ¹ß»ý½ÃÅ°À§ÇØ ÇÑ Áþ°Å¸®¿¡´Â ±×¸® ½Å°æ¾²Áö ¸»±ä¹Ù¶õ´Ù.
±×³É, º¹±¸¸¦ ¾î¶»°Ô Çß´À³Ä¿¡ ½Å°æ¾²¸é µÇ°Ú´Ù.

¾ÏÆ°, ¿¡·¯¸¦ À¯¹ß½ÃÅ°±â À§ÇØ ´ÙÀ½°ú °°ÀÌ Çß´Ù.

[¿¡·¯¸¦ ¹ß»ýÇÏ°Ô ¸¸µéÀÚ]
SQL> conn internal
¾ÏÈ£ ÀÔ·Â:
¿¬°áµÇ¾ú½À´Ï´Ù.

ÄÁÆ®·ÑÆÄÀÏ ¹é¾÷ÇصÎÀÚ.
SQL> alter database backup controlfile to 'c:\oracle\backup\db\control01.ctl';

µ¥ÀÌŸº£À̽º°¡ º¯°æµÇ¾ú½À´Ï´Ù.

½É½ÉÇѵ¥ µ¥ÀÌÅͳª Çϳª ³ÖÀÚ.
SQL> conn kang/kang
¿¬°áµÇ¾ú½À´Ï´Ù.
SQL> insert into test values('merong', '¸Þ·Õ');

1 °³ÀÇ ÇàÀÌ ¸¸µé¾îÁ³½À´Ï´Ù.

SQL> COMMIT;

Ä¿¹ÔÀÌ ¿Ï·áµÇ¾ú½À´Ï´Ù.

SQL> connect internal
¾ÏÈ£ ÀÔ·Â:
¿¬°áµÇ¾ú½À´Ï´Ù.
SQL> shutdown
µ¥ÀÌÅͺ£À̽º°¡ ´ÝÇû½À´Ï´Ù.
µ¥ÀÌÅͺ£À̽º°¡ ¸¶¿îÆ® ÇØÁ¦µÇ¾ú½À´Ï´Ù.
ORACLE ÀνºÅϽº°¡ Á¾·áµÇ¾ú½À´Ï´Ù.

ÀÚ, current control fileÀ» ¹é¾÷Çß´ø ³ðÀ¸·Î ¾þ¾î ½á¹ö¸®ÀÚ.
SQL> host copy c:\oracle\backup\db\control01.ctl c:\oracle\oradata\db\control01.ctl
1°³ ÆÄÀÏÀÌ º¹»çµÇ¾ú½À´Ï´Ù.

SQL> host copy c:\oracle\backup\db\control01.ctl c:\oracle\oradata\db\control02.ctl
1°³ ÆÄÀÏÀÌ º¹»çµÇ¾ú½À´Ï´Ù.

SQL> host copy c:\oracle\backup\db\control01.ctl c:\oracle\oradata\db\control03.ctl
1°³ ÆÄÀÏÀÌ º¹»çµÇ¾ú½À´Ï´Ù.

ÀÌÁ¦ startupÀ» ÇÏ¸é ¿¡·¯°¡ ¹ß»ýÇÑ´Ù.
SQL> startup
ORACLE instance started.

Total System Global Area 189102108 bytes
Fixed Size 75804 bytes
Variable Size 89006080 bytes
Database Buffers 99942400 bytes
Redo Buffers 77824 bytes
Database mounted.
ORA-01589: must use RESETLOGS or NORESETLOGS option for database open


[º¹±¸Çϱâ]
À§¿¡¼­ º¸µíÀÌ, DB°¡ ¹º°¡ ÀÌ»óÇÏ´Ù¸ç ¿À¶óŬÀÌ openÀ» °ÅºÎÇß´Ù.
resetlogs¿É¼ÇÀ¸·Î openÇ϶ó°í Çϴµ¥ ±×´ë·Î Çϸé DB°¡ ¾È ¿­¸°´Ù.

SQL> shutdown abort
ORACLE instance shut down.
SQL> startup mount;
ORACLE instance started.

Total System Global Area 189102108 bytes
Fixed Size 75804 bytes
Variable Size 89006080 bytes
Database Buffers 99942400 bytes
Redo Buffers 77824 bytes
Database mounted.

¾Æ·¡ ±¸¹® ½Å°æ½á¼­ º¸¾ÆµÎ¸é ÁÁ´Ù. until cancelÀº »ç½Ç ¾ÈÇØÁ൵ µÇÁö¸¸..
ºÒ¿ÏÀüº¹±¸(incomplete recovery)¸¦ ÇÒ ¼öµµ ÀÖÀ»±î ½ÍÀº »ý°¢ÀÌ µé¾î¼­ ÇØÁá´Ù.
SQL> recover database until cancel using backup controlfile;
ORA-00279: change 329875 generated at 05/06/2003 14:49:55 needed for thread 1
ORA-00289: suggestion : C:\ORACLE\ORADATA\DB\ARCHIVE\DBT001S00019.ARC
ORA-00280: change 329875 for thread 1 is in sequence #19


Specify log: {=suggested | filename | AUTO | CANCEL}
cancel
ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
ORA-01152: file 1 was not restored from a sufficiently old backup
ORA-01110: data file 1: 'C:\ORACLE\ORADATA\DB\SYSTEM01.DBF'


ORA-01112: media recovery not started

À§¿¡¼­ º¸¸é ±×³É cancelÀ» Ãļ­ º¹±¸¸¦ ÁߴܽÃÄ״µ¥, ¸Þ½ÃÁö¿¡ º¸µíÀÌ º¹±¸°¡ ½ÃÀÛµÇÁö ¾Ê¾Ò´Ù°í ÇÑ´Ù.
¿Ö? À§¿¡¼­ »¡°£»öÀ¸·Î ¸¶Å©ÇÑ ºÎºÐÀÇ ¾ÆÄ«À̺ê·Î±×´Â Á¸ÀçÇÏÁö ¾Ê±â ¶§¹®À̾ú´Ù.
¹Ì¸® º¸¿©ÁÖ°í ÇØ¾ß µÇ´Âµ¥.... ¾Æ·¡ÀÇ ¿¹¸¦ º¸µíÀÌ, ·Î±× ¾ÆÄ«À̺ùÀº sequence #18±îÁö¸¸ ÁøÇàµÇ¾úÀ½À» ¾Ë ¼ö ÀÖ´Ù.


SQL> select sequence# from v$archived_log;

SEQUENCE#
----------
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

18 rows selected.


sequence #19´Â ¾ÆÁ÷ ¾ÆÄ«À̺ùÀÌ µÇÁö ¾Ê¾Ò°í, ÀÌ ³ðÀº online redo log file·Î Á¸ÀçÇÏ°í ÀÖ´Ù.
¾Æ·¡¿¡ º¸¸é, log group 3ÀÌ sequence# 19¸¦ °¡ÁüÀ» ¾Ë ¼ö ÀÖ´Ù.

SQL> select * from v$log;

GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS
---------- ---------- ---------- ---------- ---------- --- ----------------
FIRST_CHANGE# FIRST_TIM
------------- ---------
1 1 17 1048576 1 YES INACTIVE
309670 30-APR-03

2 1 18 1048576 1 YES INACTIVE
309764 30-APR-03

3 1 19 1048576 1 NO CURRENT
329873 06-MAY-03


group 3ÀÇ ÆÄÀϸíÀ» ÆľÇÇÑ´Ù.
SQL> select * from v$logfile;

GROUP# STATUS
---------- -------
MEMBER
--------------------------------------------------------------------------------
3
C:\ORACLE\ORADATA\DB\REDO03.LOG

2 STALE
C:\ORACLE\ORADATA\DB\REDO02.LOG

1
C:\ORACLE\ORADATA\DB\REDO01.LOG


SQL> recover database until cancel using backup controlfile;
ORA-00279: change 329875 generated at 05/06/2003 14:49:55 needed for thread 1
ORA-00289: suggestion : C:\ORACLE\ORADATA\DB\ARCHIVE\DBT001S00019.ARC
ORA-00280: change 329875 for thread 1 is in sequence #19


Specify log: {=suggested | filename | AUTO | CANCEL}
C:\ORACLE\ORADATA\DB\REDO03.LOG online redo log fileÀ» ÁöÁ¤ÇØ ÁØ´Ù.
Log applied.
Media recovery complete.
SQL> alter database open resetlogs;

Database altered.

SQL>


¼³¸íÀÌ Á» ºÎÁ·ÇÑ °¨ÀÌ ÀÖÁö¸¸..
³ª¸ÓÁö ÀÚ¼¼ÇÑ ³»¿ëÀº ½º½º·Î!


This article comes from dbakorea.pe.kr (Leave this line as is)



°ü·Ã±Û : ¾øÀ½ ±Û¾´½Ã°£ : 2006/03/06 18:48 from 218.38.148.205

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