Recover the SAP on Oracle database after you perform an application-free restore.
Before You Begin
-
If you have not installed a SAP for Oracle Agent on your destination server, install the SAP for Oracle Agent with the restore-only option on the server where you will recover the database.
-
Optional: To have the CommCell Console authenticate the job, configure the parameters for CommCell Console third-party job authentication.
Procedure
RMAN_Util
-
Set the destination database mode to NOMOUNT/STARTED.
-
Manually copy the control files from the source path tho the destination path that you specified when you restored the database (Restore Options dialog box, Specify destination path box):
The location can be any directory that is under the destination path that can hold the data.
-
saparch/cntrl
-
sapdata1/cntrl
-
sapdata2/cntrl
Example
Copy the control file for the database with the SID "CER".
$ cp /restoreToDisk/3790/home/oracle/CER/sapreorg/cntrlCER.dbf /home/oracle/CER/control/saparch/cntrl/ $ cp /restoreToDisk/3790/home/oracle/CER/sapreorg/cntrlCER.dbf /home/oracle/CER/control/sapdata1/cntrl/ $ cp /restoreToDisk/3790/home/oracle/CER/sapreorg/cntrlCER.dbf /home/oracle/CER/control/sapdata2/cntrl/ -
-
Use SQLPLUS to set the destination database state to MOUNT.
-
On the on the destination server, on the command line, run the following command to restore and recover the data from the backup pieces that are on the disk.
oracle@sde-unx2 saporainstall]$ rman target sys/sys@cer Recovery Manager: Release 11.2.0.4.0 - Production on Mon Dec 15 16:49:25 2014 Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved. connected to target database: CER (DBID=1108362523, not open) RMAN> run { allocate channel cer1 type 'sbt_tape' PARMS="SBT_LIBRARY=/opt/commvault/Base/libobk.so,BLKSIZE=1048576,ENV=(CV_media=FILE,BACKUP_DIR=/destination_path/Specify location of backup pieces restores using restoretodisk feature)"; allocate channel cer2 type 'sbt_tape' PARMS="SBT_LIBRARY=/opt/commvault/Base/libobk.so,BLKSIZE=1048576,ENV=(CV_media=FILE,BACKUP_DIR=/destination_path/Specify location of backup pieces restores using restoretodisk feature)"; RESTORE DATABASE; RECOVER DATABASE UNTIL SEQUENCE 97; alter database open resetlogs; }where:
destination path: The path that you specified when you restored the data (Restore Options dialog box, Specify destination path box).
UTIL_FILE
-
Set the destination database mode to SHUTDOWN.
-
Manually copy the control files from the source path tho the destination path that you specified when you restored the database (Restore Options dialog box, Specify destination path box):
The location can be any directory that is under the destination path that can hold the data.
-
saparch/cntrl
-
sapdata1/cntrl
-
sapdata2/cntrl
Example
Copy the control file for the database with the SID "SDE".
$ cp /orasde/restoreToDisk/3551/orasde/oracle/SDE/sapbackup/cntrlSDE.dbf /orasde/oracle/SDE/control/saparch/cntrl/ $ cp /orasde/restoreToDisk/3551/orasde/oracle/SDE/sapbackup/cntrlSDE.dbf /orasde/oracle/SDE/control/sapdata1/cntrl/ $ cp /orasde/restoreToDisk/3551/orasde/oracle/SDE/sapbackup/cntrlSDE.dbf /orasde/oracle/SDE/control/sapdata2/cntrl/ -
-
Manually copy the data files to the destination server.
Example
[orasde@saplab SDE]$ cp -r /orasde/restoreToDisk/3551/orasde/oracle/SDE/DATA /orasde/oracle/SDE -
Manually copy the log files to the destination server.
Example
[orasde@saplab SDE]$ cp -r /orasde/restoreToDisk/3551/orasde/oracle/SDE/saparch /orasde/oracle/SDE -
On the destination server, log into SQLPLUS and type the following commands:
SQL> startup nomount SQL> alter database mount; SQL> recover database using backup controlfile until cancel; SQL> alter database open resetlogs; Database altered.