1.1. Lost all control file recovery
1.1.1. Simulated control file loss
RMAN> Shutdown Abort;
Oracle routines have been closed
Rman> Host;
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C: /> Del D: /oracle92/test1/control*.ctl
C: /> DIR D: /ORACLE92/TEST1/Control*.ctl
The volume in the driver D has no label.
The serial number of the volume is 644D-03D9
D: / Oracle92 / Test1 directory
Can't find a document
C: /> EXIT
Host command is completed
Rman>
1.1.2. Set Oracle_SID
Rman> exit;
The recovery manager is complete.
C: />
C: /> set oracle_sid = TEST1
C: /> echo oracle_sid
Oracle_sid
C: />
1.1.3. Login RMAN
C: /> rman
Recovery Manager: Version
9.2.0
.1.0 - Production
CopyRight (C) 1995, 2002, Oracle Corporation. All Rights Reserved.
Rman> Connect Target Lunar / Lunar @ Test1
Target database (not started)
Rman> Connect Catalog RMAN / RMAN @ rman
Connect to the recovery directory database
Rman>
1.1.4. Set DBID in RMAN
Make RMAN to know which database needs to find SPFile
(The DBID must be set in the case of data closing)
Rman> set dbid = 910599446
Is executing a command: set dbid
Rman>
1.1.5. Start the database to the Nomount state
Rman> Startup Nomount;
Target database (not started)
Oracle routines have been started
System Global Region Total 101784276 bytes
Fixed size 453332 bytes
Variable size 75497472 bytes
Database buffers 25165824 bytes
Redo buffers 667648 bytes
Rman>
1.1.6. Recovery Control File
1.1.6.1. Use the recovery directory recovery
If you use the recovery directory, you can simply execute Restore ControlFile;
RMAN> Restore ControlFile;
Start Restore in 2007- October -04
Assigned channel: ORA_DISK_1
Channel ORA_DISK_1: SID = 13 DevType = Disk
Channel ORA_DISK_1: Restore Data File Backup Set
Channel ORA_DISK_1: Restore Control File
Output file name = d: /oracle92/test1/control01.ctl
Channel ORA_DISK_1: Restored Backup Segment 1
Segment Handle = D: / RMANTEST / C-91059946-20041007-00 Tag = null params = null
Channel ORA_DISK_1: Restore completion
Copy the control file
Output file name = d: /oracle92/test1/control01.ctl
Output file name = d: /oracle92/test1/control02.ctl
Output file name = d: /oracle92/test1/control03.ctl Complete Restore in 2007- October -04
Rman>
1.1.6.2. Do not use the recovery directory recovery (recovered using the auto-backed up control file)
If you do not use the recovery directory, you can automatically back up the path to the path to restore the control file from the specified control file.
Rman> Run {
2> SET ControlFile Autobackup Format for Device Type Disk To
3> 'D: / rmantest /% f';
4> Restore ControlFile from Autobackup;
5>}
Execute the command: set controlfile autobackup format
Start Restore in 2007- October -04
Assigned channel: ORA_DISK_1
Channel ORA_DISK_1: SID = 13 DevType = Disk
Channel ORA_DISK_1: Look for automatic backup below: 20041007
Channel ORA_DISK_1: Auto Backups I have found: D: / RMANTEST / C-910599446-20041007-00
Channel ORA_DISK_1: Completed from the automatic backup recovery control file
Copy the control file
Output file name = d: /oracle92/test1/control01.ctl
Output file name = d: /oracle92/test1/control02.ctl
Output file name = d: /oracle92/test1/control03.ctl
Complete Restore in 2007- October -04
Rman> Host;
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C: /> DIR D: /ORACLE92/TEST1/Control*.ctl
The volume in the driver D has no label.
The serial number of the volume is 644D-03D9
D: / Oracle92 / Test1 directory
2004-10-07 15:18 1,630,208 Control01.ctl
2004-10-07 15:18 1,630,208 Control02.ctl
2004-10-07 15:18 1,630,208 Control03.ctl
3 files 4,890,624 bytes
0 catalogs 10, 527, 322, 112 can be used bytes
C: /> EXIT
Host command is completed
Rman>
1.1.6.3. Drawing control file
1.1.6.3.1. Detained control file from the recovery directory
When the database is opened, the control file can be analyzed, as described below is to extract the control file from the recovery directory and save it to d: /test_ctl.ora.
Rman> restore controlfile to 'd: /test_ctl.ora';
Start Restore in 2007- October -04
Use channel ORA_DISK_1
Channel ORA_DISK_1: Restore Data File Backup Set
Channel ORA_DISK_1: Restore Control File
Output file name = D: /TEST_CTL.ORA
Channel ORA_DISK_1: Restored Backup Segment 1
Segment Handle = D: / RMANTEST / C-91059946-20041007-00 Tag = null params = null
Channel ORA_DISK_1: Restore completion
Complete Restore in 2007- October -04
Rman>
1.1.6.3.2. Detained control files from automatic backup control files
The following example is from the D: / Differential Control File to the D: /
Rman> Run {2> Set ControlFile AutoBackup Format for Device Type Disk to
3> 'D: / rmantest /% f';
4> Restore ControlFile to 'D: /Test_CTL.BAK' from Autobackup;
5>}
Execute the command: set controlfile autobackup format
Start Restore in 2007- October -04
Use channel ORA_DISK_1
Channel ORA_DISK_1: Look for automatic backup below: 20041007
Channel ORA_DISK_1: Auto Backups I have found: D: / RMANTEST / C-910599446-20041007-00
Channel ORA_DISK_1: Completed from the automatic backup recovery control file
Complete Restore in 2007- October -04
Rman>
1.1.7. Mount database
Rman> Alter Database Mount;
Database has been loaded
Rman>
1.1.8. Recovery Database
RMAN> Recover Database;
Start Recover in 2007- October -04
Use channel ORA_DISK_1
Recovery of the media
Archive log thread 1 Sequence 16 has been used as a file D: /oracle92/test1/redo03.log exists on disk
Archive log file name = d: /oracle92/test1/redo03.log thread = 1 sequence = 16
Completion of media recovery
Complete Recover in 2007- October -04
Rman>
1.1.9. Open resetlogs database
Rman> ALTER DATABASE OPEN RESETLOGS;
Database has been opened
New physicalization of the database registered in the recovery directory
Rosync that is starting all restored directories
Complete all RESYNC
Rman>