today I started to clone the future production 11.2.0.3.3 database which is currently a logical standby to different physical standby’s this way i have a parallel environment ready and downtime will be minimal for the actual upgrade.

I used rman and a new feature duplicate target database from active database.

Prerequisites :

1. make a static listener entry for you standby
2. copy over the password file
3. create a minimal init.ora to be able startup nomount  (DB_NAME,DB_BLOCKSIZE,DB_UNIQUE_NAME…)

Test to  make sure you can connect to the primary ( in my case my logical standby ) and vice versa
you connect to the target database.

the manual recommends to use an spfile so that way you could do following

connect target sys@prdsitex
connect auxiliary sys@prdsiteyrun 
{
allocate channel prmy1 type disk;
allocate channel prmy2 type disk;
allocate channel prmy3 type disk;
allocate channel prmy4 type disk;
allocate channel prmy5 type disk;
allocate auxiliary channel stby type disk;
duplicate target database for standby from active database
spfile 
  set db_unique_name=’PRDSITEY’ 
set fal_client=’PRDSITEY’
  set fal_server=’PRDSITEX’ 
set log_archive_config=’dg_config=(PRDSITEX,PRDSITEY)’ 
 nofilenamecheck;
}




This didn’t work out in my case : since I was still running in compatible 10.2.0.3.0 on the logical standby (my primary) i received following error ;

startup failed: ORA-32012: SPFILE format is inconsistent with value of COMPATIBLE parameter

I circumvented this by creating an init.ora for the standby however it was a procession of echternach (3 steps forward and 2 backwards) to get it working.
i had issues with DB_FILES not correctly set,  remote_listener (this is a setup) that couldn’t be resolved, log_archive_config not correctly set, …. all things that are arranged automatically when you are able to use an spfile …. 
in the end i put following in the init.ora

db_unique_name=PRDSITEY
compatible=’10.2.0.3.0′
db_name=PRD
db_block_size=8192
service_names=PRDSITEY.eurid.eu
remote_login_passwordfile=EXCLUSIVE
CONTROL_FILES=’+DATADG1/prdsite/controlfile/current1.ctl’parameter_value_convert ‘PRDSITEX’,’PRDSITEY’
fal_client=’PRDSITEY’
fal_server=PRDSITEX’
log_archive_config=’dg_config=(PRDSITEX,PRDSITEY)’
remote_listener=’racsiteyprd-scan:1521′
db_files=1024
sga_max_size=32G
db_cache_size=20G
large_pool_size=1G
shared_pool_size=4G
pga_aggregate_target=16G
recovery_parallelism=16
NOTE one error here : 
I copy pasted parameter_value_convert ‘PRDSITEY…. but without the = sign …. 
since it comes after the controlfile section it was seen as names of control files… I noticed files named parameter_value_convert, PRDSITEY, PRDSITEX in my $ORACLE_HOME/dbs directory the default place.
this worked out for me the controlfile was copied over and the new db restarted and was mounted awaiting the restore of the datafiles (which is currently still in progress)

run 
{
allocate channel prmy1 type disk;
allocate channel prmy2 type disk;
allocate channel prmy3 type disk;
allocate channel prmy4 type disk;
allocate channel prmy5 type disk;
allocate auxiliary channel stby type disk;
duplicate target database for standby from active database
nofilenamecheck;
}

note : i changed the names of db’s for privacy issues 
thx to my twitter buddies @ik_zelf and @leight0nn for the nice moral support and tips 😉
and here

Leave a Reply