Professional Documents
Culture Documents
Approvals:
<Approver 1>
<Approver 2>
Document Control
Change Record
Reviewers
Name Position
Distribution
1
2
3
4
Document Control 2
PREPARATION 4
PREPARATION
1 Get the list of datafile 1.Login to PROD and get the list of datafiles from v$datafile as
from the instance which follows:
is used as a PROD for set head off
cloning set pages 0
select 'set newname for datafile '||file#||' to ' ||''''||name||''''||';'
from v$datafile;
select 'set newname for tempfile '||FILE#||' to ' ||''''||name||''''||';'
from v$tempfile;
2a Edit the spooled file 1.Edit the spool file with the target datafile location paths.
2b Use the attached script 1.Once edited append other lines in the file (clone_target.rman)
as reference taking attached script as reference
tcrp5i_rman.cmd
run {
allocate AUXILIARY CHANNEL c1 type disk;
allocate AUXILIARY CHANNEL c2 type disk;
allocate AUXILIARY CHANNEL c3 type disk;
allocate AUXILIARY CHANNEL c4 type disk;
set newname for datafile 1 to '/tcrp5i/oradata/data02/system01.dbf';
set newname for datafile 2 to '/tcrp5i/oradata/data02/system02.dbf';
set newname for datafile 3 to '/tcrp5i/oradata/data02/system03.dbf';
set newname for datafile 4 to '/tcrp5i/oradata/data02/system04.dbf';
set newname for datafile 5 to '/tcrp5i/oradata/data02/system05.dbf';
set newname for datafile 6 to '/tcrp5i/oradata/data02/system06.dbf';
set newname for datafile 7 to '/tcrp5i/oradata/data02/system07.dbf';
set newname for datafile 8 to '/tcrp5i/oradata/data02/system08.dbf';
set newname for datafile 9 to '/tcrp5i/oradata/data02/system09.dbf';
set newname for datafile 10 to '/tcrp5i/oradata/data02/system10.dbf';
set newname for datafile 11 to '/tcrp5i/oradata/data02/system11.dbf';
set newname for datafile 12 to '/tcrp5i/oradata/data01/undo01.dbf';
set newname for datafile 13 to '/tcrp5i/oradata/data01/a_archive01.dbf';
set newname for datafile 14 to '/tcrp5i/oradata/data01/a_int01.dbf';
set newname for datafile 15 to '/tcrp5i/oradata/data01/a_media01.dbf';
set newname for datafile 16 to '/tcrp5i/oradata/data01/a_nolog01.dbf';
set newname for datafile 17 to '/tcrp5i/oradata/data01/a_queue01.dbf';
set newname for datafile 18 to '/tcrp5i/oradata/data01/a_queue02.dbf';
set newname for datafile 19 to '/tcrp5i/oradata/data01/a_ref01.dbf';
set newname for datafile 20 to '/tcrp5i/oradata/data01/a_ref02.dbf';
set newname for datafile 21 to '/tcrp5i/oradata/data01/a_summ01.dbf';
set newname for datafile 22 to '/tcrp5i/oradata/data01/a_txn_data01.dbf';
set newname for datafile 23 to '/tcrp5i/oradata/data01/a_txn_data02.dbf';
set newname for datafile 24 to '/tcrp5i/oradata/data01/a_txn_data03.dbf';
set newname for datafile 25 to '/tcrp5i/oradata/data01/a_txn_ind01.dbf';
set newname for datafile 26 to '/tcrp5i/oradata/data01/a_txn_ind02.dbf';
set newname for datafile 27 to '/tcrp5i/oradata/data01/a_txn_ind03.dbf';
set newname for datafile 28 to '/tcrp5i/oradata/data01/a_txn_ind04.dbf';
set newname for datafile 29 to '/tcrp5i/oradata/data01/a_txn_ind05.dbf';
set newname for datafile 30 to '/tcrp5i/oradata/data01/ctxd01.dbf';
set newname for datafile 31 to '/tcrp5i/oradata/data01/odm.dbf';
set newname for datafile 32 to '/tcrp5i/oradata/data01/olap.dbf';
set newname for datafile 33 to '/tcrp5i/oradata/data01/owad01.dbf';
set newname for datafile 34 to '/tcrp5i/oradata/data01/portal01.dbf';
set newname for datafile 35 to '/tcrp5i/oradata/data01/euld01.dbf';
set newname for datafile 36 to '/tcrp5i/oradata/data01/intfd01.dbf';
set newname for datafile 37 to '/tcrp5i/oradata/data01/intfx01.dbf';
set newname for datafile 38 to '/tcrp5i/oradata/data02/sysaux01.dbf';
set newname for datafile 39 to '/tcrp5i/oradata/data01/undo02.dbf';
set newname for datafile 40 to '/tcrp5i/oradata/data01/a_txn_data04.dbf';
set newname for datafile 41 to '/tcrp5i/oradata/data01/a_txn_ind06.dbf';
set newname for datafile 42 to '/tcrp5i/oradata/data02/system12.dbf';
set newname for datafile 43 to '/tcrp5i/oradata/data01/a_ref03.dbf';
set newname for datafile 44 to '/tcrp5i/oradata/data01/xkbd_data01.dbf';
set newname for datafile 45 to '/tcrp5i/oradata/data01/xkbx_ind01.dbf';
set newname for datafile 46 to '/tcrp5i/oradata/data02/sysaux02.dbf';
set newname for datafile 47 to '/tcrp5i/oradata/data01/xxor_01.dbf';
set newname for datafile 48 to '/tcrp5i/oradata/data01/xxord_01.dbf';
set newname for datafile 49 to '/tcrp5i/oradata/data01/xxorx_01.dbf';
set newname for datafile 50 to '/tcrp5i/oradata/data01/xxord_02.dbf';
set newname for datafile 51 to '/tcrp5i/oradata/data01/xxord_03.dbf';
set newname for datafile 52 to '/tcrp5i/oradata/data01/xxorx_02.dbf';
set newname for datafile 53 to '/tcrp5i/oradata/data01/xxorx_03.dbf';
set newname for datafile 54 to '/tcrp5i/oradata/data01/undo03.dbf';
set newname for datafile 55 to '/tcrp5i/oradata/data01/undo04.dbf';
set newname for datafile 56 to '/tcrp5i/oradata/data01/undo05.dbf';
set newname for datafile 57 to '/tcrp5i/oradata/data01/undo06.dbf';
set newname for tempfile 1 to ''/tcrp5i/oradata/data02/temp03.dbf';
set newname for tempfile 2 to '/tcrp5i/oradata/data02/temp02.dbf';
set newname for tempfile 3 to '/tcrp5i/oradata/data02/temp01.dbf';
set newname for tempfile 4 to '/tcrp5i/oradata/data02/temp04.dbf';
set newname for tempfile 5 to '/tcrp5i/oradata/data02/temp05.dbf';
set newname for tempfile 6 to '/tcrp5i/oradata/data02/temp06.dbf';
set until scn 1497768084 ;
duplicate target database to "TCRP5I"
LOGFILE
GROUP 1 ('/tcrp5i/oradata/data03/log1a.dbf',
'/tcrp5i/oradata/data03/log1b.dbf') SIZE 100M,
GROUP 2 ('/tcrp5i/oradata/data03/log2a.dbf',
'/tcrp5i/oradata/data03/log2b.dbf') SIZE 100M,
GROUP 3 ('/tcrp5i/oradata/data03/log3a.dbf',
'/tcrp5i/oradata/data03/log3b.dbf') SIZE 100M;
}
3 Add tns entry of source 1.Get the tns entries from source (PROD) and catalog and add
and catalog in the target these entries to target instance tnsnames under $TNS_ADMIN
instance tnsnames.ora
4 Query the catalog for 1.Connect to source and catalog as follows:
backup information
rman target sys/Termina1@pcatsi catalog
rmanpcatsi/rmanpcatsi@rman
rman>list backup;
5 Edit clone_target.rman From the output of the above command choose the latest SCN
We can also use below commands:
Also edit parameter file and
make the suggested Connect ditcats22: sqlplus rmanpcatsi/rmanpcatsi@rman
changes.
Select
db_name,completion_time,thread#,sequence#,first_change#,next
_change# from rc_backup_redolog where trunc(completion_time)
>=trunc(sysdate-1) order by 3,4,2
Modify the clone_target.rman and put the latest SCN from the
above command.
_no_recovery_through_resetlogs=true
6 Check for the channels 1.check the channel that is being used is that of commvault
We can check this from the log file generated
7 Target database 1) Shutdown both Target instances.
preparation
2) From node 1 startup restrict exclusive
3) drop database (Make sure that all datafiles deleted from the
server)
4) Update below init parameters:(1st node only)
#cluster_database = true
#cluster_database_instances = 2
_no_recovery_through_resetlogs=TRUE
5) Start DB in no-mount stage.
8 Run the script 1.Run the script rman_target.sh
rman_target.sh
2.This script will start the restore
3.Once the restore is done check the status of the database
9 Check the status of 1. Run :
database select count(*) from v$recover_file;
2.Run:
select distinct(status) from v$datafile;
To make sure all the files are online and there are no files that
need recovery
10 Enable RAC(Only for Use the below commands to check log file volumes.
VCATSI & QCATSI) set linesize 200
col MEMBER for a50
select * from v$logfile; ----> Check the group and members
column. Each group will be having one or two members
select * from v$log----------> check thread# Column. it will show
the value 1 now.
cluster_database = true
cluster_database_instances = 2
PING THE NODES & INSTANCES FROM OTHER NODES & INSTANCE
TO CROSS VERIFY THE RAC ENABLING
11 Resize the TEMP CREATE A NEW TEMP3 TABLESPACE AND MAKE IT AS DEFUALT-
tablespace(Size – 10gb)
create temporary tablespace TEMP3 tempfile
'/vdata02/VCATSI/temp01.dbf' size 1800M;
alter database default temporary tablespace temp3;
DROP THE OLD TEMP TABLESPACES-
drop tablespace temp1 including contents and datafiles;
drop tablespace temp2 including contents and datafiles;
Sql>shutdown immediate;
Sql>startup mount
Sql>alter database noarchivelog
Sql>alter database open
15 Perform another sanity 1.Perform another sanity check of the database
check