HP OpenView Storage Data Protector B6960-96008 User Manual

Page of 396
Integrating Oracle and Data Protector
Restoring an Oracle Database
Chapter 1
101
• On Windows: 
<ORACLE_HOME>\bin\rman target 
sys/manager@PROD nocatalog
• On UNIX: 
<ORACLE_HOME>/bin/rman target sys/manager@PROD 
nocatalog
• On  OpenVMS: 
rman target sys/manager@PROD nocatalog
2. Start the tablespace restore and recovery.
• If the database is in the open state, the script to restore and 
recover the tablespace should have the following format:
run{
allocate channel <dev1> type 'sbt_tape' parms 
'ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=<DB_NAME>)';
sql 'alter tablespace TEMP offline immediate';
restore tablespace TEMP;
recover tablespace TEMP;
sql 'alter tablespace TEMP online';
release channel dev1;
}
• If the database is in the mount state, the script to restore and 
recover the tablespace should have the following format:
run{
allocate channel <dev1> type 'sbt_tape' parms 
'ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=<DB_NAME>)';
restore tablespace 'TEMP';
recover tablespace 'TEMP';
release channel <dev1>;
}
You can also save the script into a file and perform a tablespace restore 
using the saved files:
1. Create a file 
restore_TAB
 in the 
/var/opt/omni/tmp
 (UNIX 
systems) or 
<Data_Protector_home>\tmp
 (Windows systems) 
directory.