OS downtime of production machine, RMAN disaster recovery

xiaoxiao2021-03-05  24

The problem of a friend's database system, the following is his resolution process, which is very helpful to learn RMAN:

The following is a case:

OS downtime of production machine, RMAN disaster recovery

In the process of learning the RMAN, I suddenly encountered a thousand dangerous "good opportunity" to learn RMAN because it is a production machine, so the following operation goals are used to return data with the shortest time, and all operations have no special studies, but still This throwing bricks, I hope that there is a reference value for RMAN beginners. Scenario Description: Production machine is unable to start because of viral infection or malignant attacks, and I have made a full storage backup, backup file and backup of the rule logs after a few days ago. Don't save it on a machine. How can I recover after reinstalling OS and Oracle? The Catalog database is currently working properly.

Solution: My full storage backup script is as follows: rman> run {2> Allocate channel d1 type disk maxpiecesize = 500m; 3> Backup full database4> format 'c: / oracle / RMAN / DB_% D_% S_% p_% t '; 5> Release Channel D1; 6>} 1. View the cause of the target library DBID: C: C: C: (> SQLPLUS RMAN / RMAN @ rmansql * plus: release 9.2.0.1.0 - Production on Thursday April 7 14: . 26:57 2005Copyright (c) 1982, 2002, Oracle Corporation All rights reserved connection to:. Oracle9i Enterprise Edition Release 9.2.0.1.0 - ProductionWith the Partitioning, OLAP and Oracle Data Mining optionsJServer Release 9.2.0.1.0 - ProductionSQL> Select * from DB; DB_KEY DB_ID HIGH_CONF_RECID LAST_KCCDIVTS CURR_DBINC_KEY ------------------------------------- ---------------------- 45 1729098935 0 554810295 462. Set dbidc: /> RMAN recovery manager: Version 9.2.0.1.0 - ProductionCopyRight (C) 1995 , 2002, Oracle Corporation. All Rights Reserved.r> Set DBID 1729098935 is being executed: set dbid3. Register an instance on the newly installed machine and start to Nomount (original backup passed PFile) C: /> ORADIM -NEW -SID CNPL -pfile c: /oracle/rman/initcnpl.ora -intpwd CNPL5154. Starting listening, formulation TNSName.Orac: /> SQLPLUS "SYS / CNPL515 @ CNPL AS SYSDB A "SQL * Plus: Release 9.2.0.1.0 - Production on 4 8 14:43:06 2005 Copyright (C) 1982, 2002, Oracle Corporation. All Rights Reserved. Connected to free routines SQL> Startup Nomount Pfile = C : /oracle/rman/initcnpl.ora (Pfile file can be written casually, or turn it back to the original Copy, but must notify the parameters of the staging) Oracle routines Start Total System Global Area 135338868 bytesFixed Size 453492 bytesVariable Size 109051904 bytesDatabase Buffers 25165824 bytesRedo Buffers 667648 bytes5. Back rman restore controlfile (this step is to pay attention, be sure to create a directory with the original exactly the same on the new machine, rman will not automatically create a directory, in this case c : / ORACLE / ORADATA / CNPL) C: /> Rman Catalog RMAN / RMAN @

RMAN Restore Manager: Version 9.2.0.1.0 - ProductionCopyRight (C) 1995, 2002, Oracle Corporation. All Rights Reserved. Connection to Recovery Directory Database RMAN> Set DBID 1729098935 is being executed: set dbidrman> connection target sys / cnpl515 @ CNPLTSD Connect to Target Database: CNPL (Not installed) RMAN> Restore ControlFile; Launch Restore to assign by RESTORE in 08-April -05: ORA_DISK_1 channel ORA_DISK_1: SID = 10 DevType = Disk channel ORA_DISK_1: Start recovery data file backup set channel ORA_DISK_1: Restoring control file output file name = C: /ORACLE/ORADATA/CNPL/CONTROL01.CTL channel ORA_DISK_1: 1 segment restored backup segment handle = C: / ORACLE / RMAN / DB_CNPL_1_1_555085654 tag = TAG20050408T143003 params = NULL channel ORA_DISK_1: Restore completion is replication control file output file name = c: /oracle/oradata/cnpl/control01.ctta output file name = c: /oracle/oradata/cnpl/control02.ctl output file name = C: / Oracle / ORADATA / CNPL /Control03.ctl Complete Restore in 08-April -05rman> 6. Start the new database to MountSQL> SQL> ALTER DATABASE MOUNT; SQL> 7. Back to RSTORE DATABASE; RMAN> RESTORE DATABASE; start RESTORE assigned by 08-April -05: ORA_DISK_1 channel ORA_DISK_1: SID = 12 DevType = Disk channel ORA_DISK_1: Start recovery data file backup set channel ORA_DISK_1: The data file that is specified from the backup set recovery is recovering data file 00001 Go to C: /oracle/roadata/cnpl/system01.dbf is recovering data file 00002 to C: / Oracle / ORADA TA / CNPL / UNDOTBS01.DBF is recovering data file 00003 to c: /oracle/roadata/cnpl/cwmlite01.dbf is recovering data file 00004 to c: /oracle/oradata/cnpl/drsys01.dbf is being file 00005 Restore to C: /Oracle/oradata/cnpl/example01.dbf is recovering data file 00006 to c: /oracle/roadata/cnpl/indx01.dbf is recovering data file 00007 to c: / oracle / oradata / cnpl / odm01 .Dbf is returning data file 00008 to c: /oracle/oradata/cnpl/tools01.dbf is recovering data file 00009 to c: /oracle/roadata/cnpl/Users01.dbf is returning data file 00010 to C: / ORACLE / ORADATA / CNPL / XDB01.DBF channel ORA_DISK_1: 1 segment restored backup segment handle = C: / ORACLE / RMAN / DB_CNPL_8_1_554919188 tag = TAG20050406T161533 params = NULL channel ORA_DISK_1: 2 segment restored backup segment handle = C: / ORACLE / RMAN / DB_CNPL_8_2_554919188 Tag = Tag20050406T161533 params =

Null Channel ORA_DISK_1: Restore Completion Restore in 2008- April -058. Performing RECOVER Action RMAN> Recover Database; Starting Recover In 2008- April -05 Using Channel ORA_DISK_1 Positive Start Media Restore Archive Log Tail 1 Sequence 12 As a file C: /oracle/ora92/rdbms/arc00012.001 Archive log file name = C: /oracle/ora92/rDBMS/ARC00012.001 Thread = 1 Sequence = 12 Unable to find an archive log archive log thread = 1 sequence = 13RMAN-00571: ============================================== ============= r--00569: =============== Error Message Stack Follows ============== = RMAN-00571: =============================================== ============== RMAN-03002: Failure of Recover Command AT 04/08/2005 09: 11: 33rman-06054: Media Recovery Requesting Unknown log: thread 1 SCN 523585 error, repay Try the original redo02.log, redo01.log, redo03.log copy back to the newly created directory, and then proceed, and the result can be successfully Recover.

RMAN> Recover Database; Starting Recover in 2008-48-05 Using Channel ORA_DISK_1 Positive Recovery Archive Log Tail 1 Sequence 3 As a file C: /Oracle/Ordata/cnpl/redo02.log exists on disk Archive log thread 1 Sequence 4 As a file C: /oracle/oradata/cnpl/redo03.log Presented on disk Archive log thread 1 Sequence 5 has been filed as file C: /Oracle/Ordata/cnpl/redo01.log exists on disk Archive log file Name = c: /oracle/roadata/cnpl/redo02.log thread = 1 sequence = 3 Archive log file name = C: /oracle/oradata/cnpl/redo03.log thread = 1 sequence = 4 Archive log file name = C: /Oracle/oradata/cnpl/redo01.log thread = 1 sequence = 5 Recovery of completion media Recover 08-April -05rman> run {2> SQL 'ALTER DATABASE OPEN RESETLOGS'; 3>} SQL statement: ALTER DATABASE Open RESETLOGSRMAN> RMAN> 9. Verification data is of course satisfactory, all data is completed. 10. Hurry and then do a full storage backup, modify to archive mode, and put it again. Postscript: All operations are performed on the Windowns 2000 Server platform, Oracle9.2.0.1, I don't know if the last step is performed on whether the Redo Physical COPY is cross-platform, because the environment is limited, and there is no good way to do this. Become of REDO. Because, this chance of this OS downtime is still existing, which prawn provides a better rejuvenation of this OS downtime. I have given some suggestions for a case:

I think I should modify the full library backup script, plus the statement of the backup archive log: RMAN> Run {2> Allocate Channel D1 Type Disk Maxpiecesize = 500m; 3> Backup Full Database4> Format 'C: / Oracle / RMAN / DB_% D_% s_% p_% t '; 5> SQL' ALTER SYSTEM Archive log current '; 6> Backup FilesPerset 3 ArchiveLog All Delete Input; 7> Release Channel D1; 8>} This Even if there is no original redolog backup, use archive logs It is also possible to restore the database.

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

New Post(0)