RMAN Restoration Procedure
The Process describes the DB cloning using RMAN backup of Source Database .
Step 1 : Crete a Pfile for Target database (mqtest)
If the Database is being dropped , retain the spfile of existing database .
Step 2 : Copy Password file from Source to target Server .
Password file will be in location $ORACLE_HOME/dbs
Password file name will be in format orapwORACLE_SID
copy the password file from Sorce server to target Server and rename the file to target DB name
Step 3 : Startup the database is Nomount State using Pfile (This step can be skipped if SPfile is already Availble )
SQL > start nomount pfile='$ORACLE_HOME/dbs/initmqtest.ora' ;
SQL > create spfile from pfile='$ORACLE_HOME/dbs/initmqtest.ora' ;
SQL > Shut immediaate ;
Step4: Startup DB again in Nomount stage and verify if DB is in Archivelog mode
set lines 550 pages 550
alter session set nls_date_format='DD_MM_YY HH24:MI' ;
col db_unique_name for a20
col instance_name for a20
Col startup_time for a25
select a.db_unique_name,b.INSTANCE_NAME,a.open_mode,b.STARTUP_TIME,to_char(SYSDATE,'DD-MM-YY HH24:MI'),
a.database_role,a.log_mode,a.flashback_on from gv$database a,gv$instance b WHERE A.inst_id=b.inst_id ;
show parameter db_create_file_dest ;
select file_name from v$datafile ;
##### Datafiles should be In location for parameter db_create_file_dest#############
if Location are different
alter system set db_create_file_dest='*********' ;
step 5: Create a Rman Command file to Run Restoration process .
File_name - rman_restre_DATE.rman
connect auxiliary
run
{
allocate auxiliary channel C1 type disk ;
allocate auxiliary channel C2 type disk ;
allocate auxiliary channel C3 type disk ;
DUPLICATE DATABASE TO mqtest BACKUP LOCATION '/archive/RMAN_BKP/' NOFILENAMECHECK ;
release auxiliary channel C1;
release auxiliary channel C2;
release auxiliary channel C3;
}
Step 6 : Start the Rman Restoration .
nohup rman cmdfile=rman_restre_DATE.rman log=rman_duplicate_script.log &
Step 7 : Monitor the Process of Restoreation
tail -100f rman_duplicate_DATE.log
Step8 : Post Restoration Check Status of Database .
set lines 550 pages 550
alter session set nls_date_format='DD_MM_YY HH24:MI' ;
col db_unique_name for a20
col instance_name for a20
Col startup_time for a25
select a.db_unique_name,b.INSTANCE_NAME,a.open_mode,b.STARTUP_TIME,to_char(SYSDATE,'DD-MM-YY HH24:MI'),
a.database_role,a.log_mode,a.flashback_on from gv$database a,gv$instance b WHERE A.inst_id=b.inst_id ;
Step 9 : Convert DB into No archivelog mode if necessary .
Comments
Post a Comment