You are using Recovery Manager (RMAN) with a recovery catalog to back up your production database. The
backups and the archived redo log files are copied to a tape drive on a daily basis. Because of media failure,
you lost your production database completely along with the recovery catalog database. You want to recover
the target database and make it functional. You consider performing the following steps to accomplish the task:
1. Restore an autobackup of the server parameter file.
2. Restore the control file
3. Start the target database instance
4. Mount the database
5. Restore the data files
6. Open the database with RESETLOGS option
7. Recover the data files
8. Set DBID for the target database
Which option illustrates the correct sequence that you must use?
A.
8, 1, 3, 2, 4, 5, 7, 6
B.
1, 8, 3, 4, 2, 5, 7, 6
C.
1, 3, 4, 2, 8, 5, 6, 7
D.
1, 3, 2, 4, 6, 5, 7, 8
Explanation:
Recovering the Database After a Disaster
The procedure for disaster recovery is similar to the procedure for recovering the database with a backup
control file in NOCATALOG mode. If you are restoring the database to a new host, then you should also review
the considerations described in “Restoring a Database on a New Host”.
This scenario assumes that the Linux server on which your database was running has been damaged beyond
repair. Fortunately, you backed up the database to Oracle Secure Backup and have the tapes available. The
scenario assumes the following:
To recover the database on the new host:
1. If possible, restore or re-create all relevant network files such as tnsnames.ora and listener.ora and a
password file.
2. Start RMAN and connect to the target database instance.
At this stage, no initialization parameter file exists. If you have set ORACLE_SID and ORACLE_HOME, then
you can use operating system authentication to connect as SYSDBA. For example, start RMAN as follows:
% rman
RMAN> CONNECT TARGET/
3. Specify the DBID for the target database with the SET DBID command, as described in “Restoring the
Server Parameter File”.
For example, enter the following command:
SET DBID 676549873;
4. Run the STARTUP NOMOUNT command.
When the server parameter file is not available, RMAN attempts to start the instance with a dummy server
parameter file.
5. Allocate a channel to the media manager and then restore the server parameter file from autobackup.
For example, enter the following command to restore the server parameter file from Oracle Secure Backup:
RUN
{
ALLOCATE CHANNEL c1 DEVICE TYPE sbt;
RESTORE SPFILE FROM AUTOBACKUP;
}
6. Restart the instance with the restored server parameter file.
STARTUP FORCE NOMOUNT;
7. Write a command file to perform the restore and recovery operation, and then execute the command file.
The command file should do the following:
a. Allocate a channel to the media manager.
b. Restore a control file autobackup (see “Performing Recovery with a Backup Control File and No Recovery
Catalog”).
c. Mount the restored control file.
d. Catalog any backups not recorded in the repository with the CATALOG command.
e. Restore the data files to their original locations. If volume names have changed, then run SET
NEWNAME commands before the restore operation and perform a switch after the restore operation to update
the control file with the new locations for the data files, as shown in the following example.
f. Recover the data files. RMAN stops recovery when it reaches the log sequence number specified.
RMAN> RUN
{
# Manually allocate a channel to the media manager
ALLOCATE CHANNEL t1 DEVICE TYPE sbt;
# Restore autobackup of the control file. This example assumes that you
have
# accepted the default format for the autobackup name.
RESTORE CONTROLFILE FROM AUTOBACKUP;
# The set until command is used in case the database
# structure has changed in the most recent backups, and you want to
# recover to that point in time. In this way RMAN restores the database
# to the same structure that the database had at the specified time.
ALTER DATABASE MOUNT;
SET UNTIL SEQUENCE 1124 THREAD 1;
RESTORE DATABASE;
RECOVER DATABASE;
}
The following example of the RUN command shows the same scenario except with new file names for the
restored data files:
RMAN> RUN
{
# If you must restore the files to new locations,
# use SET NEWNAME commands:
SET NEWNAME FOR DATAFILE 1 TO ‘/dev/vgd_1_0/rlvt5_500M_1’;
SET NEWNAME FOR DATAFILE 2 TO ‘/dev/vgd_1_0/rlvt5_500M_2’;
SET NEWNAME FOR DATAFILE 3 TO ‘/dev/vgd_1_0/rlvt5_500M_3’;ALLOCATE CHANNEL t1 DEVICE TYPE sbt;
RESTORE CONTROLFILE FROM AUTOBACKUP;
ALTER DATABASE MOUNT;
SET UNTIL SEQUENCE 124 THREAD 1;
RESTORE DATABASE;
SWITCH DATAFILE ALL; # Update control file with new location of data files.
RECOVER DATABASE;
}
8. If recovery was successful, then open the database and reset the online logs:
ALTER DATABASE OPEN RESETLOGS;