Professional Documents
Culture Documents
NOTE: Examples in this Document are taken Based on PROD TO DEV Restore. This method uses the soft links for file mounts. Pre Refresh Steps:
1. 2.
1.
2.
3.
4.
6.
3.
Pre Checks for Mounts / oratab / init.ora / soft links 3 A. Make sure all datafile mounts exists on the restored
server: Get a list of datafile mounts from PROD. Compare to the datafile mount on DEV server. send BASTeam to add the missing datafile mounts.
Inform BAS Team to Create the /RMAN Mounts on DEV Server Similar to PROD. Add entry for SID in DBA/RMAN_NOBACKUP/ Run all pre refresh tasks for backing up passwords, privs, dblinks, directories etc as per the refresh<SID> document. y y y
4.
5.
Modify the Control File Modify the control file info on DEVdb : /u01/DEVDB/product/10.2.0/dbs/initPROD.ora Modified control file to reflect :PROD_20100530120000_level0_after.ctl 1) *.control_files='/uv100/oradata/DEV/PROD_20100530120000_level 0_after.ctl','/uv101/oradata/DEV/PROD_20100530120000_level0 2) Db_name=PROD Startup Database y Source the Instance as PROD y Sqlplus /as sysdba y Startup mount y $rman target / --Then run below command. Decide the channels to use based on the cpu.
run {allocate channel d1 type disk; allocate channel d2 type disk; allocate channel d3 type disk; allocate channel d4 type disk; allocate channel d5 type disk; allocate channel d6 type disk; allocate channel d7 type disk; allocate channel d8 type disk; SET UNTIL TIME "to_date('30-05-2010 12:10:00','DD-MM-YYYY HH24:MI:SS')"; RESTORE DATABASE; RECOVER DATABASE; release channel d1; release channel d2; release channel d3; release channel d4; release channel d5; release channel d6; release channel d7; release channel d8;}
y y y 6.
<as source PROD> alter database open resetlogs; alter database backup controlfile to trace; get the latest .trc file from udump and keep set#2 PROD>shutdown immediate --( On D/T server )
7.
Rename Database & Open as Target ( For Ex: As DEV) y Copy the .trc from above step to /tmp/ as refresh.sql and modify the dbname and the mount names to reflect DEV. ( same step as regular refresh ) Startup Database & Add Tempfiles. y Alter database open resetlogs y ALTER TABLESPACE TEMP ADD TEMPFILE '/t_uv1tmp/oradata/DEV/temp_02.tbf' SIZE 8001M REUSE AUTOEXTEND OFF;
Examples in this section are for DEVRefresh Using PRODTape backup of 17th May. Step 1: Complete all the Steps in above section upto 3.A. ( Pre refresh tasks, Validate mounts, rman file info for db, archive, control. ) Add PROD, PRMN to TNSNAMES Entries on DEVDB. Just in case rename the spfile DEV.ora on $ORACLE_HOME/dbs Modify the init DEV.ora file by adding the below two parameters with Source,Target dest for file conversion.
'/uf806/oradata/PROD/','/uf806/oradata/DEV/', '/uf807/oradata/PROD/','/uf807/oradata/DEV/') log_file_name_convert='/uf8redoa/oradata/PROD/','/uf8redoa/oradata/DEV/', '/uf8redob/oradata/PROD/','/uf8redob/oradata/DEV/' Step 4: DEV>startup nomount --on one session
On a Second Session connect to rman: Step 5: $ rman RMAN> connect catalog rman/******@PRMN RMAN> connect target system/*****@PROD RMAN> connect auxiliary /
Step 6: run{ allocate channel d1 type disk; allocate channel d2 type disk; allocate channel d3 type disk; allocate channel d4 type disk; allocate channel d5 type disk; allocate channel d6 type disk; allocate channel d7 type disk; allocate channel d8 type disk; allocate auxiliary channel t2 type disk; SET UNTIL TIME "to_date('17-05-2010 19:00:00','DD-MM-YYYY HH24:MI:SS')"; duplicate target database to DEV; release channel d1; release channel d2; release channel d3; release channel d4; release channel d5; release channel d6; release channel d7; release channel d8; release channel t2; }
Step 7: Check Errors if any after the completion of Above. If no errors, should have been started DEV/
Step 8: DEV> alter database open resetlogs; Step 9: DEV>shutdown immediate; DEV>Startup;
Step 10: Run post refresh Steps (passwords, privs, dblinks, directories etc as per the refresh<SID>Documentation from sharepoint.