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:
For a non-ZDB or ZDB backup set session:
run{
allocate channel dev1 type 'sbt_tape' parms
'SBT_LIBRARY=/opt/omni/lib/libob2oracle8.so,
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;
}
For a ZDB proxy-copy session, allocate one channel for restoring proxy-copy
sessions and one channel for database recovery. Release the proxy-copy
channel before the recovery:
run{
allocate channel 'dev1' type 'sbt_tape' parms
'SBT_LIBRARY=/opt/omni/lib/libob2oracle8.so,
ENV=(OB2BARTYPE=Oracle8,OB2PROXYCOPY=1, OB2APPNAME=DB_NAME)';
allocate channel 'dev2' type 'sbt_tape' parms
'SBT_LIBRARY=/opt/omni/lib/libob2oracle8.so,
ENV=(OB2BARTYPE=Oracle8, OB2APPNAME=DB_NAME)';
sql 'alter tablespace TEMP offline immediate';
restore tablespace TEMP;
release channel 'dev1';
recover tablespace TEMP;
sql 'alter tablespace TEMP online';
release channel 'dev2';
}
• If the database is in the mount state, the script to restore and recover the
tablespace should have the following format:
For a non-ZDB or ZDB backup set session:
run{
allocate channel dev1 type 'sbt_tape' parms
'SBT_LIBRARY=/opt/omni/lib/libob2oracle8.so,
ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=DB_NAME)';
restore tablespace 'TEMP';
recover tablespace 'TEMP';
release channel dev1;
}
Data Protector Oracle ZDB integration130