CLONE 10gR2 RAC With 11i EBS On Linux
CLONE 10gR2 RAC With 11i EBS On Linux
BACKUP PRODUCTION.............................................................................................................................5
APPLICATIONS Configuration:....................................................................................................................13
SETUP CONCURRENT MANAGERS PRIMARY AND SECONDARY NODES (THROUGH Oracle Application
Manager)...........................................................................................................................................14
B BACKUP PRODUCTION
rman target / nocatalog
1 Backup Source Production database
@/oraclone/RMAN/scripts/11i_10grac_clone.rman
configure device type disk parallelism 8 backup type to backupset;
configure maxsetsize to 31000m;
backup as backupset tag 'CLONE_DB' database format '/oraclone/RMAN/CLONE/%U';
backup as backupset tag 'CLONE_DB' archivelog all format
'/oraclone/RMAN/CLONE/%U';
sql ‘ALTER SYSTEM ARCHIVE LOG CURRENT’;
backup tag 'CLONE_DB' as copy current controlfile format
'/oraclone/RMAN/CLONE/backup_controlfile.ctl';
exit
After successful completion do not use crosscheck or report obsolete commands in rman
C PREPARE BACKUP DIRECTORY ON THE DEVELOPMENT ENVIRONMENT
Unmount the /oraclone from prdb01 # umount /oraclone
1
Mount /orabkp at devdb01: # mount /dev/mapper/bckp1p1 /orabkp -t ext3
2
On devdb01 as root change permissions # chown -R oracle /orabkp
3
on /orabkp
D CLEANUP ASM DIRECTORIES ON THE DEVELOPMENT ENVIRONMENT
On devdb01 as the oracle user, set the Run asm bash profile function
1 ASM-related environment variables
Edit the temporary initialization file Beware that the db_name in the temporary init.ora is still set to
3 initERPDEV.ora.tmp PROD11I until step …
WARNING: In every session opened during the cloning process, be aware of setting the ORACLE_SID variable
startup nomount
pfile=/opt/app/oracle/product/10.2.0/db_1/appsutil/admin/ERPDEV/initERPDEV.ora.tmp
restore controlfile from '/orabkp/RMAN/CLONE/backup_controlfilec.ctl';
alter database mount;
exit
connect / as sysdba
set echo off pages 0 feed off sqlp #
spool restore-rac2.rman
select 'catalog start with ''/orabkp/RMAN/CLONE'' NOPROMPT;' from dual;
select 'RUN { ' from dual;
select 'set newname for datafile '||file#||' to NEW;' from v$datafile;
select 'set newname for tempfile '||file#||' to NEW;' from v$tempfile;
select 'restore database;' from dual;
select 'switch datafile all;' from dual;
select 'switch tempfile all;' from dual;
select 'recover database;' from dual;
select '} ' from dual;
select 'exit' from dual;
spool off
exit
set echo off pages 0 feed off linesize 5000 TRIM on TRIMS on sqlp #
spool restore-rac-logfile.sql
select 'connect /as sysdba' from dual;
select 'alter database rename file '''||member||''' to
'||'''+DEVDATA/erpdev/onlinelog/'|| REGEXP_REPLACE(''||member||'','.*/') ||''';'
from v$logfile;
select 'exit' from dual;
spool off
exit
The above step G1 will create the script sqlplus "/ as sysdba" @restore-rac-logfile.sql
2
restore-rac-logfile.sql which you should
run it as sysdba in order to rename redo
files
H OPEN DATABASE WITH RESETLOGS (SINGLE-INSTANCE DATABASE PHASE)
sqlplus / as sysdba
1
Open the database with resetlogs. This
will recreate the onlinelogs. SQL> alter database open resetlogs;
…
…
## The location & name to which the "new" Target System control file
## will be restored to...Set to desired location...must be on shared
## storage location access by both Target System RAC nodes
control_files='+DEVDATA/ERPDEV/CONTROLFILE/current.353.689167275’
…
…
Sqlplus / as sysdba
3 Startup mount database SQL> startup mount pfile=’
$ORACLE_HOME/appsutil/admin/ERPDEV/initERPDEV.ora.tmp’
Change the database name using nid nid target=/ dbname=ERPDEV
4 utility. The database will shutdown after
the run.
Set the new db_name in the temporary
init.ora under directory
$ORACLE_HOME/appsutil/admin/ERPDEV
5 before we continue. So edit
initERPDEV.ora.tmp and modify the line:
Db_name=…
…
…
## Source System Global Database Name...NOT A SID NAME
db_name=ERPDEV
## New Target System Global Database Name...NOT A SID NAME
db_unique_name=ERPDEV
## The number of DB files available to RMAN, set to appropriate value
db_files = 4096
…
…
Sqlplus / as sysdba
Startup mount the database and open it SQL> startup mount pfile=’
6 $ORACLE_HOME/appsutil/admin/ERPDEV/initERPDEV.ora.tmp’
with the resetlogs option
SQL>ALTER DATABASE OPEN RESETLOGS;
7 Shutdown the database
SQL> shutdown immediate;
…
…
## The location & name to which the "new" Target System control file
## will be restored to...Set to desired location...must be on shared
## storage location access by both Target System RAC nodes
control_files='+DEVDATA/ERPDEV/CONTROLFILE/current.353.689167275’
…
…
SQL> startup mount
pfile='/opt/app/oracle/product/10.2.0/db_1/a
Startup mount the database using this ppsutil/admin/ERPDEV/initIMP.ora';
2
new init.ora and disable archivelog mode SQL> alter database noarchivelog;
SQL> alter database open
…
…
## The location & name to which the "new" Target System control file
## will be restored to...Set to desired location...must be on shared
## storage location access by both Target System RAC nodes
control_files='+DEVDATA/ERPDEV/CONTROLFILE/current.353.689167275’
…
…
K CREATE SPFILE FOR RAC DATABASE (RAC DATABASE PHASE)
SQL> startup
pfile='/opt/app/oracle/product/10.2.0/db_1/a
1 Startup the database using initRAC.ora ppsutil/admin/ERPDEV/initRAC.ora';
3 Shutdown instance
SQL> shutdown immediate;
Node devdb01:
export ORACLE_SID=ERPDEV1
2 Run autoconfig on both database nodes ./$ORACLE_HOME/appsutil/scripts/ERPDEV1_devdb01/
adautocfg.sh
Node devdb02:
export ORACLE_SID=ERPDEV2
./$ORACLE_HOME/appsutil/scripts/ERPDEV2_devdb02/
adautocfg.sh
APPLICATIONS Configuration:
STEPS ACTION COMMAND
Applications Steps A4-C3 do not apply if you are configuring the clone of ERPTEST since it has only one application server.
So you only need to run autoconfig on appdev3 and nothing else. Also run step 33.
6. Exit AD Administration
2 $scripts
Run autoconfig on all apps tiers
$adautocfg.sh
FNDCPASS apps/<apps_pass> 0 Y system/<system_pass>
3 Change SYSADMIN password USER SYSADMIN <system_pass>
$scripts
4 Bounce all application services $adstpall.sh apps/<apps_pass>
$adstrtal.sh apps/<apps_pass>
F STEPS FOR CLONING THE MIDDLE TIER ENVIRONMENT
If the application tier is also cloned from the Production Environment to any of the Development or Test Environments
then you should follow the instructions in Metalink Note: 230672.1 and tasks: Section 2 (task 1b & 2a & 3b).
Because the target environment has If working on the DEVELOPMENT:
many customizations, after successfully under appdev1:/erp/BACKUP copy ERPDEV_appdev1.xml in
1 running all the cloning scripts, copy the appdev1:/opt/erp/appl/admin
following XML files depending on which and copy ERPDEV_appdev2.xml in appdev2:/opt/erp/appl/admin
environment you are working on
If working on the TEST:
under appdev3:/erp/BACKUP copy ERPTEST_appdev3.xml in
appdev3:/opt/erp/appl/admin
When the files are copied for the working environment, run
autoconfig: