Example - Performing a redirected restore of Oracle
For example, assume the following:
Source client is camel
Destination client is giraffe
Primary server is lion
ORACLE_SID is test
The user is connected to the Oracle database using a local connection, not SQL*Net
UNIX user is ora on both camel and giraffe
To perform a redirected restore (example)
- Create the following file on server lion:
Windows: install_path\NetBackup\db\altnames\giraffe
UNIX: /usr/openv/netbackup/db/altnames/giraffe
Edit giraffe to contain the name camel:
- Do one of the following:
Windows: Use the BAR GUI to set lion as the primary server.
UNIX: Log onto giraffe as ora. Set SERVER=lion in $ORACLE_HOME/bp.conf. This server must be the first server that is listed in the bp.conf file.
- Modify the network tnsnames.ora file to enable the RMAN catalog connection.
- Create inittest.ora.file.
- Windows: Using Oracle administration, create and start ORACLESERVICETEST.
- Set the environment variable ORACLE_SID to test. On UNIX, also set NB_ORA_CLIENT to camel.
- Make sure that the destination database directory exists and has appropriate access permissions.
The data files are restored to the directory path with the same name they had when they were backed up.
- Start the database in a nomount state.
On UNIX, the following is the output:
SQL> startup nomount pfile=$ORACLE_HOME/dbs/inittest.ora %rman catalog rman/rman@rcat RMAN> set dbid=<dbid of source database on camel RMAN> connect target/ RMAN> run { RMAN> ALLOCATE CHANNEL CH00 TYPE 'SBT_TAPE'; RMAN> SEND 'NB_ORA_SERV=lion, NB_ORA_CLIENT=camel'; RMAN> restore controlfile; RMAN> } SQL> alter database mount; %orapwd file=$ORACLE_HOME/dbs/orapwtest password=<oracle> %rman catalog rman/rman@RCVCAT RMAN>set dbid=<Saved dbID of Source Target> RMAN>connect target/ RMAN>run { RMAN> ALLOCATE CHANNEL CH00 TYPE 'SBT_TAPE'; RMAN> ALLOCATE CHANNEL CH01 TYPE 'SBT_TAPE'; RMAN> SEND 'NB_ORA_SERV=lion, NB_ORA_CLIENT=camel'; RMAN> restore database; RMAN> restore archivelog all; RMAN> } SQL>recover database until cancel using backup controlfile;Now apply the archived logs. Type cancel when you decide to stop recovery.