Cloning
Apps 11i
Multinode to single node
Apps R12.2.x cloning steps:
Multinode to single node
To see if your environment is ready for the Cloning with Rapid Clone, please check the Metalink Note 230672.1.
NOTE: The initial system has ONE APPL_TOP on one node (apps.localdomain) and the DB tier on another node (db.localdomain).
These easy to follow steps will allow you to move or clone Oracle applications from one location to another. This can be essential when moving from a multi-node system to single-node system. It may seem complex, but by approaching such a task one stage at a time it will become much easier under understand this technical process.
1. Maintain Snapshot information (on the APPS node)
adadmin -> 2. Maintain Applications Files menu -> 5. Maintain snapshot information -> 2. Update current view snapshot
2. Prepare the source system database tier for cloning
cd <RDBMS ORACLE_HOME>/appsutil/scripts/<CONTEXT_NAME>
perl adpreclone.pl dbTier
cd $ORACLE_HOME/appsutil/scripts/VIS_apps
perl adpreclone.pl dbTier
perl adpreclone.pl dbTier
3. Prepare the source system application tier for cloning
cd <COMMON_TOP>/admin/scripts/<CONTEXT_NAME>
perl adpreclone.pl appsTier
perl adpreclone.pl appsTier
cd $COMMON_TOP/admin/scripts/VIS_apps
perl adpreclone.pl appsTier
perl adpreclone.pl appsTier
4. Stop the Apps services if is not already done
$COMMON_TOP/admin/scripts/<CONTEXT_NAME>/adstpall.sh apps/apps
$COMMON_TOP/admin/scripts/VIS_apps/adstpall.sh apps/apps
5. Shutdown the Database and stop the listener
$ORACLE_HOME/appsutil/scripts/<CONTEXT_NAME>/addlnctl.sh stop VIS
$ORACLE_HOME/appsutil/scripts/<CONTEXT_NAME>/addbctl.sh stop immediate VIS
$ORACLE_HOME/appsutil/scripts/<CONTEXT_NAME>/addbctl.sh stop immediate VIS
$ORACLE_HOME/appsutil/scripts/VIS_db/addlnctl.sh stop VIS
$ORACLE_HOME/appsutil/scripts/VIS_db/addbctl.sh stop immediate VIS
$ORACLE_HOME/appsutil/scripts/VIS_db/addbctl.sh stop immediate VIS
6. On the target system, create the directory where the Applications will be cloned
[oracle@linux1 ~]$ su - root
Password:
[root@linux1 ~]# mkdir /APPS_11i
[root@linux1 ~]# chown oracle:dba /APPS_11i
Password:
[root@linux1 ~]# mkdir /APPS_11i
[root@linux1 ~]# chown oracle:dba /APPS_11i
7. Copy the following application tier directories from the source node to the target application tier node:
<APPL_TOP>
<OA_HTML>
<OA_JAVA>
<OA_JRE_TOP>
<COMMON_TOP>/util
<COMMON_TOP>/clone
<COMMON_TOP>/_pages (when this directory exists)
<806 ORACLE_HOME>
<iAS ORACLE_HOME>
Source Node = apps.localdomain Destination Node = linux1.localdomain /APPS_MI/visappl /APPS/visappl /APPS_MI/viscomn/html /APPS/viscomn/html /APPS_MI/viscomn/java /APPS/viscomn/java /APPS_MI/viscomn/util /APPS/viscomn/util /APPS_MI/viscomn/clone /APPS/viscomn/clone /APPS_MI/viscomn/_pages /APPS/viscomn/_pages /APPS_MI/visora/8.0.6 /APPS/visora/8.0.6 /APPS_MI/visora/iAS /APPS/visora/iAS
The files are copied from the apps node (apps.localdomain) and db node (db.localdomain) to the new node ( linux1.localdomain). This type of cloning is very similar with a single node system to single node system.
8. Copy the DBF files and ORACLE_HOME to the target system
Source Node = db.localdomain | Destination Node = linux1.localdomain |
/APPS_DB/visdata | /APPS/visdata |
/APPS_DB/visdb | /APPS/visdb |
9. Start up the source Applications system database and application tier processes (optional)
10. Configure the target system database server
Connected as ORACLE:
cd <RDBMS ORACLE_HOME>/appsutil/clone/bin
perl adcfgclone.pl dbTier
cd /APPS/visdb/9.2.0/appsutil/clone/bin
perl adcfgclone.pl dbTier
11. Configure the target system application tier server nodes
Connected as APPLMGR:
cd <COMMON_TOP>/clone/bin
perl adcfgclone.pl appsTier
cd
/APPS/viscomn/clone/bin
perl adcfgclone.pl appsTier
Attention:
- Windows user only: add <806 ORACLE_HOME>\bin to the system path before running this step
- When you run adcfgclone.pl on appsTier as APPLMGR, APPLMGR must have write permission to the oraInventory
12. Finishing Tasks
Log in to the target system application tier node as the APPLMGR user.Run the following tasks in adadmin for all products to generate JAR files, generate message files, relink executables copy files to destination
Log in to the target system application tier node as the APPLMGR user.Run the following tasks in adadmin for all products to generate JAR files, generate message files, relink executables copy files to destination
13. Clean up of the target system
Remove the temporary directory [COMMON_TOP]/clone/appl to reduce disk space usage.
R12.1.x
Clone Oracle Apps R12 Short Steps
Pre-Clone Steps:
On the DB server:
· cd $ORACLE_HOME/appsutil/scripts/
· perl adpreclone.pl dbTier
· Check the log file under
· $ORACLE_HOME/appsutil/log//StageDBTier_06201503.log
On the apps tier server:
· cd $ADMIN_SCRIPTS_HOME
· perl adpreclone.pl appsTier
· Check the log file $APPL_TOP/admin/log/
Clone Steps:
Copy the source apps tier file system to the target system.
· APPL_TOP.
· COMMON_TOP
· ORACLEAS_10.1.2_ORACLE_HOME
· ORACLEAS_10.1.3_ORACLE_HOME
Copy source system database tier file system to the target system. As user oracle:
· Shutdown normal the source system database.
· Copy the database (.dbf) files plus ORACLE_HOME to the target system.
On the target Database system
· cd $ORACLE_HOME/appsutil/clone/bin
· perl adcfgclone.pl dbTier
· Verify errors the log $ORACLE_HOME/appsutil/log/
On the target apps system
· $cd $COMMON_TOP/clone/bin
· $perl adcfgclone.pl appsTier
· Verify the errors the log. $APPL_TOP/admin//log
· Once clone is finished. If you have customized environment then change post clone profile options, utl_file_dir etc.
EBS R12 RAC TO RAC Clone
1- OC must be installed and running on all DB nodes.
2- Execute the following on all appTier and dbTier Source nodes.
$ cd $ORACLE_HOME/appsutil/scripts/[context_name]
$ perl adpreclone.pl dbTier
3- On the primary oracle RAC node execute:
$ cd [ORACLE_HOME]/appsutil/clone/bin
$ perl adclone.pl
java=[JDK 1.5 Location]
mode=stage
stage=[Stage Directory]
component=database
method=RMAN
dbctx=[RAC DB Context File] -- Full Path to the existing Oracle RAC database context file
showProgress
This will generate directoris. Go to [stage]/data/stage u will find rman iamge-copies like
"1jj9c44g_1_1" those files and the file "backup_controlfile.ctl" must be moved to the target system
.
5- Archive the database home as follow:
$ cd $ORACLE_HOME/..
$ tar -cvzf rac_db_oh.tgz [DATABASE TOP LEVEL DIRECTORY]
This archive must be transfered to the whole RAC nodes to be used on the target system.
6- On the target system extract the archived home as:
$ tar -xvzf rac_db_oh.tgz
7- Create pairs file on the first node as follow:
[NEW_ORACLE_HOME]/appsutils/clone/pairsfile.txt
it will contains the folow
s_undo_tablespace=[UNDOTBS1 for Initial Node]
s_dbClusterInst=[Total number of Instances in a cluster e.g. 2]
s_db_oh=[Location of new ORACLE_HOME]
8- Create the context file for the primary node as follow:
$ cd $[NEW_ORACLE_HOME]/appsutil/clone/bin
$ perl adclonectx.pl
contextfile=[PATH to OLD Source RAC contextfile.xml]
template=[NEW ORACLE_HOME]/appsutil/template/adxdbctx.tmp
pairsfile=[NEW ORACLE_HOME]/appsutil/clone/pairsfile.txt
initialnode
9- Restore database on the target system primary node as follow:
$ cd $[NEW_ORACLE_HOME]/appsutil/clone/bin
$ perl adclone.pl
java=[JDK 1.5 Location]
component=dbTier
mode=apply
stage=[NEW_ORACLE_HOME]/appsutil/clone
method=CUSTOM
dbctxtg=[Full Path to the Target Context File]
rmanstage=[Location of the RMAN dump files... i.e. RMAN_STAGE/data/stage]
rmantgtloc=[Shared storage loc for datafiles...ASM diskgroup / NetApps NFS mount / OCFS mount point]
srcdbname=[Source RAC system GLOBAL name s_global_database_name]
pwd=[APPS Password]
showProgressode
$ tail -f [ORACLE_HOME]/appsutil/log/$CONTEXT_NAME/ ApplyDatabase_[time].log
10- Check the listener status on target system
$ ps -ef | grep tns
-- listener must be up and running before the autococnfig
11- Run the Autoconfig
$ cd [ORACLE_HOME]/appsutil/scripts/[CONTEXT_NAME]
$ adautocfg.sh appspass=[APPS Password]
12- For the other nodes do the folowing:
A- Uncompress the archived home.
B- Compress the appsutil and move it from the primary node to the other nodes
$ cd [ORACLE_HOME]
$ zip -r appsutil_node1.zip appsutil
C- Update the pairsfile.txt to checnge the parameter s_undo_tablespace:
s_undo_tablespace=[Or UNDOTBS(+1) for additional Nodes]
s_dbClusterInst=[Total number of Instances in a cluster e.g. 2]
s_db_oh=[Location of new ORACLE_HOME]
D- Create a context file:
$ cd [NEW_ORACLE_HOME]/appsutil/clone/bin
$ perl adclonectx.pl
perl adclonectx.pl \
contextfile=[Path to Existing Context File from the First Node]
template=[NEW ORACLE_HOME]/appsutil/template/adxdbctx.tmp
pairsfile=[NEW ORACLE_HOME]/appsutil/clone/pairsfile.txt
addnode
E- Continue cloning as follow:
$ cd [NEW ORACLE_HOME]/appsutil/clone/bin
$ perl adcfgclone.pl dbTechStack [path to the database context file created in previous step]
F- [NEW_ORACLE_HOME]/appsutil/scripts/[CONTEXT_NAME]/addlnctl.sh start LISTENER_[hostname]
this command to run the correct RAC listener.
G- Source the environment file:
$ cd [NEW ORACLE_HOME]
$ ./[CONTEXT_NAME].env
H- Edit the [SID]_APPS_BASE.ora file and change the control file parameter to reflect the
correct control file location on the shared storage.
I- Start the RAC db
$ sqlplus /nolog
SQLPLUS> connect / as sysdba
SQLPLUS> startup
J- Run the autoconfig to generate the tnsnames and listeners files.
$ cd $ORACLE_HOME/appsutil/scripts/$CONTEXT_NAME
$ ./adautocfg.sh appspass=[APPS Password]
To create the database with RAC on the target manually:
$ srvctl add database -d [database_name] -o [oracle_home]
$ srvctl add instance -d [database_name] -i [instance_name] -n [host_name]
$ srvctl add service -d [name] -s [service_name]
To be continue...
Comments
Post a Comment