Cold backup restore database can not recover before

xiaoxiao2021-03-06  57

For the cold backup restore database, you cannot perform the problem of front rollback. The relevant link on the ITPUB forum is at http://www.itpub.net/showthread.php?s=&threadiD=220971 passed the experiment, the cold backup restore database can be performed roll-forward recovery: the following experimental procedure: SQL> connect internal / oracleConnected.SQL> archive log listDatabase log mode Archive ModeAutomatic archival EnabledArchive destination / opt / oracle / arch / ORCLOldest online log sequence 747Next log sequence to archive 749Current log sequence 749SQL> select * From v $ log;

Group # thread # sequence # bytes Members Arc Status ------------------------------------------------------------------------------------ ---------- ---- ---------------- first_change # first_tim ----------------- ---- 1 1 748 51200000 1 Yes Inactive 5209950 21-SEP-04

2 1 749 51200000 1 NO CURRENT 5222702 23-SEP-04

3 1 747 51200000 1 YES inactive 5205433 21-Sep-04ssql> SELECT * FROM V $ logfile;

Group # status --------------- MEMBER ---------------------------- -------------------------------------------------- - 1 / OPT / ORACLE / DB02 / ORADATA / ORCL / Redo01.log

2 / OPT / ORACLE / DB03 / ORADATA / ORCL / Redo02.log

3 / OPT / ORACLE / DB04 / ORADATA / ORCL / Redo03.logsql> Connect Test / TestConnected.SQL> Select * from user_tables;

No rows selected

SQL> CREATE TABLE T (a varchar2 (10));

Table created.sql> ALTER System Switch logfile; (switch log, generating an archive log file)

System altered.sql> INSERT INTO T VALUES ('1');

1 row created.

SQL> commit;

COMMIT COMPLETE.

SQL> ALTER SYSTEM SWITCH LOGFILE; (switch log, generating an archive log file)

System altered.sql> INSERT INTO T VALUES ('2');

1 row created.

SQL> commit;

COMMIT COMPLETE.

SQL> ALTER SYSTEM SWITCH LOGFILE; (switch log, generating an archive log file) System altered.sql> Insert INTO T VALUES ('3');

1 row created.

SQL> commit;

COMMIT COMPLETE.

SQL> ALTER SYSTEM SWITCH LOGFILE; (switch log, generating an archive log file)

System altered. SQL> Host $ CD / OPT / ORACLE / ARCH / ORCL

$ LS (a total of four archived logs) Arch_1_749.arc arch_1_750.arc arch_1_751.arc arch_1_752.arcsql> EXIT SQL> SELECT * FROM T;

A ---------- 123SQL> INSERT INTO T VALUES ((4 '); (inserts a fourth record 4, but does not switch the log, this record is recorded in redo03.log)

1 row created.

SQL> commit;

Commit complete closed database:. SQL> connect internal / oracleConnected.SQL> shutdown immediateDatabase closed.Database dismounted.ORACLE instance shut down.SQL> host $ cp /opt/oracle/db04/oradata/ORCL/redo03.log / opt / oracle / (Separate the current log redo03.log to / opt / oracle directory) $ RM / OPT / ORACLE / DB02 / ORADATA / ORCL / * $ RM / OPT / ORACLE / DB03 / ORADATA / ORCL / * $ RM / OPT / ORACLE / DB04 / ORADATA / ORCL / * All data files (including online log files and control files) when CP cold backups are turned back, and the cold backup made before this experiment. SQL> Startup Mountoracle Instance Started.

Total System Global Area 1134141116 bytesFixed Size 102076 bytesVariable Size 311750656 bytesDatabase Buffers 819200000 bytesRedo Buffers 3088384 bytesDatabase mounted.SQL> recover database using backup controlfile until cancel; (Note that there must use using backup controlfile until cancel command) ORA-00279: change 5224492 generated AT 09/23/2004 11:00:18 Needed for Thread 1OR-00289: Suggestion: /opt/oracle/arch/orcl/arch_1_749.arcora-00280: Change 5224492 For Thread 1 is in sequence # 749specify log: { = suggester | filename | Auto | Cancel} autoora-00279: Change 5224671 generated at 09/24/2004 10:27:50 Needed for thread 1OR-00289: Suggestion: /opt/oracle/arch/orcl/arch_1_750.arcora- 00280: change 5224671 for thread 1 is in sequence # 750ORA-00278: log file '/opt/oracle/arch/ORCL/arch_1_749.arc' no longer needed forthis recoveryORA-00279: change 5224683 generated at 09/24/2004 10: 31:23 Needed for Thread 1ORA-00289: Suggestion: / OPT / Oracle / Arch / OR CL / Arch_1_753.arcora-00280: Change 5224683 for thread 1 is in sequence # 753specify log: { = suggested | filename | auto | ca Zan} /opt/oracle/redo03.log (here you specify the backup of the backup / OPT / Oracle / redo03.log file) log applied.media recovery completion.sql> conn test / testconnected.sql> select * from t; ora-00279: change 5224675 generated at 09/24/2004 10:29:00 Needed for thread 1 OA -00289: Suggest: /opt/oracle/arch/orcl/arch_1_751.arcora-00280: change 5224675 for thread 1 is in sequence # 751ora-00278: log file '/opt/oracle/arch/orcl/arch_1_750.arc' NO Longer Needed Forthis Recovery

ORA-00279: Change 5224679 Generated AT 09/24/2004 10:30:44 Needed for thread 1OR-00289: Suggestion: /opt/oracle/arch/orcora-00280: Change 5224679 for thread 1 is in sequence # 752ora-00278: log file '/opt/oracle/arch/orcl/arch_1_751.arc' no longer Needed Forthis Recoveryora-00279: Change 5224683 Generated AT 09/24/2004 10:31:23 Needing for Thread 1ORA-00289: Suggestion: /opt/oracle/arch/orcl/arch_1_753.arcora-00280: Change 5224683 for thread 1 is in sequence # 753ora-00278: log file '/opt/oracle/arch/orcl/arch_1_752.arc' no longer needed forthis Recovery

ORA-00308: can not open archived log '/opt/oracle/arch/ORCL/arch_1_753.arc'ORA-27037: unable to obtain file statusSVR4 Error: 2: No such file or directoryAdditional information: 3SQL> alter database open resetlogs; ( At this time, open the database with Open ResetLogs)

Database altered.sql> connection test / testconnected.sql> select * from t;

A ---------- 123 The results found that the database did not completely recovery, only three records were restored, and the records were lost, because the red backup covered the redo03.log, and the cold backup There is no record in the redo03.log, and the last record 4 records actually recorded the redo03.log before the fault before the cold backup, so only 3 records can only be recovered. If you apply backup in the redo03.log under the / opt / oracle directory, the database can be fully recovered. At the time of recovery, the last recovery, specified backup redo03.log: SQL> Recover Database Using Backup ControlFile Until Cancel; ORA-00279: Change 5224492 Generated AT 09/23/2004 11:00:18 Needed for thread 1ORA-00289 : suggestion: /opt/oracle/arch/orcl/arch_1_749.arcora-00280: Change 5224492 For Thread 1 IS in Sequence # 749sql> Recover Database Using Backup ControlFile UnTil Cancel;

Specify log: { = suggested | filename | auto | ca Zan} autoora-00279: change 5224671 generated at 09/24/2004 10:27:50 Needed for thread 1ORA-00289: Suggestion: / OPT / Oracle / Arch / ORCL / arch_1_750.arcORA-00280: change 5224671 for thread 1 is in sequence # 750ORA-00278: log file '/opt/oracle/arch/ORCL/arch_1_749.arc' no longer needed forthis recoveryORA-00279: change 5224675 generated at 09 / 24/2004 10:29:00 Needed for thread 1ORA-00289: Suggestion: /opt/oracle/arch/orCL/Arch_1_751.arcora-00280: change 5224675 for thread 1 is in sequence # 751ora-00278: log file '/ OPT / ORACLE / ARCH / ORCL / ARCH_1_750.ARC 'NO LONGER Needed Forthis Recovery

ORA-00279: Change 5224679 Generated AT 09/24/2004 10:30:44 Needed for thread 1OR-00289: Suggestion: /opt/oracle/arch/orcora-00280: Change 5224679 for thread 1 is in sequence # 752ora-00278: log file '/opt/oracle/arch/orcl/arch_1_751.arc' no longer Needed Forthis Recovery

ORA-00279: Change 5224683 generated at 09/24/2004 10:31:23 Needed for thread 1OR-00289: suggestion: /opt/oracle/arch/orcra-00280: change 5224683 for thread 1 is in sequern # 753ora-00278: log file '/opt/oracle/arch/orcl/arch_1_752.arc' No longer Needed Forthis Recovery

ORA-00308: Cannot Open Archid Log '/opt/oracle/arch/orcl/arch_1_753.arc'ora-27037: Unable to Obtain File Statussvr4 error: 2: No Such file or directoryAdditional Information: 3

A ---------- 1234 Discover the data completely restored. Summary: Recover the database before all the files at the cold backup, specify the Recover Database Using Backup ControlFile Util Cancel when recover until all archives, the app is hand-made, otherwise the control file will be old. No need to recover errors, note that the last log wants to use online logs to recover.

转载请注明原文地址:https://www.9cbs.com/read-113608.html

New Post(0)