Wednesday, May 12, 2010

Disaster Recovery using RMAN

This scenario assumes the following:

• All the filesystems including oracle binaries and TSM Client of the Database Server will be available in the DR Server.
• Database TESTDB uses a server parameter file (not a client-side initialization parameter file)
• We are using Control File for the purpose of this DR and not the Recovery Catalog
• You have a record of the DBID for TESTDB (1527325274)
• A media manager (TSM Server) is accessible

Steps followed were as follows -

Step 1. Connect RMAN without catalog

rman TARGET / NOCATALOG

Step 2. Start the instance without mounting it.

RMAN> SET DBID 1527325274; --> DBID of the Source Database (TESTDB)

RMAN> STARTUP NOMOUNT;

startup failed: ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file -----
starting Oracle instance without parameter file for retrival of spfileOracle instance started

Step 3. Restore and edit the server parameter file.

RUN
{
allocate channel t1 device type 'sbt_tape' PARMS="ENV=(TDPO_OPTFILE=/oracle/tdpo/TESTDB/tdpo.opt)";
RESTORE SPFILE TO PFILE '/oracle/product/10.2/dbs/initTESTDB.ora' FROM AUTOBACKUP;
SHUTDOWN ABORT;
}

Step 4. Start the database at NOMOUNT state.

STARTUP FORCE NOMOUNT PFILE='/oracle/product/10.2/dbs/initTESTDB.ora';

Step 5. Restore the Control File from the Autobackup..

RUN
{
ALLOCATE CHANNEL t1 DEVICE TYPE 'sbt_tape' PARMS="ENV=(TDPO_OPTFILE=/oracle/tdpo/TESTDB/tdpo.opt)";
RESTORE CONTROLFILE FROM AUTOBACKUP;
release channel t1;
}

Step 6. Restore and Recover the database

run
{
allocate channel t1 device type 'sbt_tape' PARMS="ENV=(TDPO_OPTFILE=/oracle/tdpo/TESTDB/tdpo.opt)";
set until time "to_date('05/10/2010 4:00','MM/DD/YYYY HH24:MI')";
restore database;
recover database;
release channel t1;
}

Step 7. Open the databse and start Listener

ALTER DATABASE OPEN RESETLOGS;

lsnrctl start

Check if everything is running on the database server -

ps –ef grep smon
ps –ef grep tns

No comments:

Post a Comment