12 June 2013

Example script: RMAN Refresh using Duplicate with Tivoli TDP


Rman Duplicate command is quite handy replacement for the old restore/recover/recreate controlfile process. This is the example of the setup and basic RMAN commands to run toduplicate database called PROD to a database called TST. All commands should be run on the test server.

Preparation:


#!/bin/sh
....
/* Removed variables and error checking */
emctl start blackout TST_REFRESH TST
Shutdown
Start nomount with pfile (or prepare CONVERT parameters in advance)

....
rman nocatalog AUXILIARY / target u/p@$PRODB << EOM >> ${PROCLOG}
SET parallelmediarestore OFF;

RUN

{
SET UNTIL TIME "TO_DATE ('$RESTOREDT', '$DTFORMAT')";

allocate AUXILIARY channel t1 type 'sbt_tape' parms='ENV=(TDPO_OPTFILE=/opt/tivoli/tsm/etc/PRODSRVR/tdpo_PRODDB.opt,

DSMI_CONFIG=/opt/tivoli/tsm/etc/PRODSRVR/dsm.opt, XINT_PROFILE=/oracle/11.2.0.3/dbs/initPRODDB.utl, PROLE_PORT=57323)';
...  allocate more channels if needed...

DUPLICATE DATABASE PRODDB DBID 2442234667 TO TST;


release channel t1;

}
quit
EOM
...
Convert to noarchivelog
Remote block change tracking if not planning to do incrementals
If needed, purge recycle bin and AUD$
emctl start blackout TST_REFRESH TST

This page is powered by Blogger. Isn't yours?