Cloning is the process of creating an identical copy of the oracle application system.There are two types of cloning methods available for Oracle application one is adclone and another one is rapid clone.
Ad clone is an oracle provided utility to clone application system. This utility is used to clone application system for release 11.5.1 to 11.5.5 for systems which are not autoconfig enabled, Whereas rapidclone is used for those which are autoconfig enabled.
We can find our application is autoconfig enabled or not by opening env files from APPL_TOP APPLSYS.env and APPSORA.env. If the top of the file says that it is maintained by autoconfig, then your system probably using auotconfig.
What happens when you run adpreclone.pl?
adpreclone.pl prepares source system to be cloned by collecting information about the database and creates various templates of files containing source specific hard core values.It collects all the information about the source application system, the port number of the source etc.these templates are stored in the appsutil/templae directory.
1)Single node to multi node clone
Sorce Node-PROD Tartget-Dev1
DB Tier DB Tier
prodb proddb
proddata proddata
Tartget-Dev2
Apps Tier
prodcomn Apps tier
prodappl prodcomn,prodappl,prodora
prodora
Some of the reasons to do a cloning are:
Make sure target servers have same component verson and OS as source servers.
-bash-3.2$ cd /maildata_test/mcgm/R12/apptier/apps/apps_st/appl
-bash-3.2$. APPSrdb_mailserver2.env
Ad clone is an oracle provided utility to clone application system. This utility is used to clone application system for release 11.5.1 to 11.5.5 for systems which are not autoconfig enabled, Whereas rapidclone is used for those which are autoconfig enabled.
We can find our application is autoconfig enabled or not by opening env files from APPL_TOP APPLSYS.env and APPSORA.env. If the top of the file says that it is maintained by autoconfig, then your system probably using auotconfig.
What happens when you run adpreclone.pl?
adpreclone.pl prepares source system to be cloned by collecting information about the database and creates various templates of files containing source specific hard core values.It collects all the information about the source application system, the port number of the source etc.these templates are stored in the appsutil/templae directory.
Different kinds of Cloning.
1)Single node to multi node clone
Sorce Node-PROD Tartget-Dev1
DB Tier DB Tier
prodb proddb
proddata proddata
Tartget-Dev2
Apps Tier
prodcomn Apps tier
prodappl prodcomn,prodappl,prodora
prodora
Some of the reasons to do a cloning are:
- To create a test environment from an existing production environment to test some patches or to reproduce any production issues.
- To keep a test environment with the most current information of a production environment.
- To move any existing environment to other servers
Make sure target servers have same component verson and OS as source servers.
- Login as Applications file user & set the environment file on source node.
-bash-3.2$ cd /maildata_test/mcgm/R12/apptier/apps/apps_st/appl
-bash-3.2$. APPSrdb_mailserver2.env
- Login to database tier as oracle user and set the environment on source node.
-bash-3.2$ su - oracle
-bash-3.2$ cd /maildata_test/mcgm/R12/dbtier/db/tech_st/11.1.0/
-bash-3.2$ . rdb_mailserver2.env
Prepare the source server
-bash-3.2$.perl /adpreclone.pl dbTier
2 Prepare the source system application tier for cloning
-bash-3.2$ cd $COMMON_TOP/admin/scripts
in R12(cd $ADMIN_SCRIPTS_HOME)
-bash-3.2$cd /maildata_test/mcgm/R12/apptier/apps/rdb_mailserver2/admin/scripts(R12)
-bash-3.2$perl adpreclone.pl appsTier
Copy the Source Node File System
-bash-3.2$cd /maildata_test/mcgm/R12/apptier/apps/rdb_mailserver2/admin/scripts(R12)
-bash-3.2$./adstpall.sh apps/apps
Copy the following application tier directories from the source node to the target application tier node:
copy appltop and commontop and oratop to target servers
scp –pr appl_top applmgr@target_server:/d01/oracle
scp –pr comn_top applmgr@target_server:/d01/oracle
scp –pr ora_top applmgr@target_server:/d01/oracle
Once copied –
Check the ownership as required
Rename the directory on target server
cd /d01/oracle
mv appl_top devappl
mv comn_top devcomn
mv ora_top devora
Copy the database tier file system
stop all database services
Perform a normal shutdown of the source system database
-bash-3.2$cd $RDBMS_ORACLE_HOME/appsutil/scripts/rdb_mailserver2
-bash-3.2$./addbctl.sh stop
Copy the database (DBF) files from the source to the target system
Copy the source database ORACLE_HOME to the target system as shown below:
cd /d01/oracle
scp –pr proaddb oracle@target_server:/d01/oracle
scp –pr proaddata oracle@target_server:/d01/oracle
Once copied –
- Check the ownership as required
- Rename the directory
cd /d01/oracle
mv proddb devdb
mv proddata devdata
Start up the source Applications system database and application tier processes
Configure the Target System
Operating System of Target should be same as Source. Operating system should have all pre-requisite packages required for Oracle R11i before configuring the Target System. Execute the following commands to configure the target system. You will be prompted for the target system specific values (SID, Paths, Ports, etc).
Log on to target node as oracle user and run the following command and input your values to each prompt as shown below
-bash-3.2$ cd /maildata_test/mcgm/R12/dbtier/db/tech_st/11.1.0/appsutil/clone/bin
-bash-3.2$ perl adcfgclone.pl dbTier
Enter APPS Password :
Configure the target system application tier server nodes
Log on to the target system as the APPLMGR user and type the following commands and
specify your values to each prompt as shown below.
-bash-3.2$ cd /maildata_test/mcgm/R12/apptier/apps/apps_st/comn/clone/bin
$ perl adcfgclone.pl appsTier
Enter the APPS password
All application services are started successfully. Thatmeans, we have done cloning successfully.
Finishing Tasks
Post clone steps vary from client to client, here is the basic change.
Profile Option Name Changes at Site Level after Cloning
Site Name-> PROD, Change it to “DEV – Clone of PROD as of Dec 14 2010”
DEV – Clone of PROD as of 14-Dec-10
Login to Oracle Apps as SYSADMIN
Select System Administrator responsibility
Multinode Sharedappltop to same architechture
If you having shared APPL_TOP then apart from running the adcfgclone.pl you need to run "adclonectx.pl sharedappltop" for sharing appltop from all nodes. In this case you need to run adcfgclone.pl only form the first node and you can create the context file using adclonectx.pl in other nodes using context file refernece as first node. Then you need to run the txkSOHM.pl from $FND_TOP/patch/115/bin which will create 8.0.6 and IAS config homes for your application system.
1)Maintain snapshot information
Log in as the applications user on each application tier node and run ‘Maintain Snapshot Information’ by using adadmin.
2) Merge existing APPL_TOPs
Log in to the primary node of your application tier as the application user user and run:
$ cd [COMMON_TOP]/admin/scripts/[CONTEXT_NAME]
$ perl adpreclone.pl appsTier merge
This will prompt you with option to merge secondary nodes
-bash-3.2$ cd /maildata_test/mcgm/R12/dbtier/db/tech_st/11.1.0/
-bash-3.2$ . rdb_mailserver2.env
Prepare the source server
- Prepare the source system dbtier for cloning
-bash-3.2$.perl /adpreclone.pl dbTier
2 Prepare the source system application tier for cloning
-bash-3.2$ cd $COMMON_TOP/admin/scripts
in R12(cd $ADMIN_SCRIPTS_HOME)
-bash-3.2$cd /maildata_test/mcgm/R12/apptier/apps/rdb_mailserver2/admin/scripts(R12)
-bash-3.2$perl adpreclone.pl appsTier
Copy the Source Node File System
- Log on to the source system application tier nodes as the APPLMGR user
- Shut down the application tier server processes as shown below
-bash-3.2$cd /maildata_test/mcgm/R12/apptier/apps/rdb_mailserver2/admin/scripts(R12)
-bash-3.2$./adstpall.sh apps/apps
Copy the following application tier directories from the source node to the target application tier node:
copy appltop and commontop and oratop to target servers
scp –pr appl_top applmgr@target_server:/d01/oracle
scp –pr comn_top applmgr@target_server:/d01/oracle
scp –pr ora_top applmgr@target_server:/d01/oracle
Once copied –
Check the ownership as required
Rename the directory on target server
cd /d01/oracle
mv appl_top devappl
mv comn_top devcomn
mv ora_top devora
Copy the database tier file system
stop all database services
Perform a normal shutdown of the source system database
-bash-3.2$cd $RDBMS_ORACLE_HOME/appsutil/scripts/rdb_mailserver2
-bash-3.2$./addbctl.sh stop
Copy the database (DBF) files from the source to the target system
Copy the source database ORACLE_HOME to the target system as shown below:
cd /d01/oracle
scp –pr proaddb oracle@target_server:/d01/oracle
scp –pr proaddata oracle@target_server:/d01/oracle
Once copied –
- Check the ownership as required
- Rename the directory
cd /d01/oracle
mv proddb devdb
mv proddata devdata
Start up the source Applications system database and application tier processes
Configure the Target System
Operating System of Target should be same as Source. Operating system should have all pre-requisite packages required for Oracle R11i before configuring the Target System. Execute the following commands to configure the target system. You will be prompted for the target system specific values (SID, Paths, Ports, etc).
Log on to target node as oracle user and run the following command and input your values to each prompt as shown below
-bash-3.2$ cd /maildata_test/mcgm/R12/dbtier/db/tech_st/11.1.0/appsutil/clone/bin
-bash-3.2$ perl adcfgclone.pl dbTier
Enter APPS Password :
Configure the target system application tier server nodes
Log on to the target system as the APPLMGR user and type the following commands and
specify your values to each prompt as shown below.
-bash-3.2$ cd /maildata_test/mcgm/R12/apptier/apps/apps_st/comn/clone/bin
$ perl adcfgclone.pl appsTier
Enter the APPS password
All application services are started successfully. Thatmeans, we have done cloning successfully.
Finishing Tasks
Post clone steps vary from client to client, here is the basic change.
Profile Option Name Changes at Site Level after Cloning
Site Name-> PROD, Change it to “DEV – Clone of PROD as of Dec 14 2010”
DEV – Clone of PROD as of 14-Dec-10
Login to Oracle Apps as SYSADMIN
Select System Administrator responsibility
Multinode Sharedappltop to same architechture
If you having shared APPL_TOP then apart from running the adcfgclone.pl you need to run "adclonectx.pl sharedappltop" for sharing appltop from all nodes. In this case you need to run adcfgclone.pl only form the first node and you can create the context file using adclonectx.pl in other nodes using context file refernece as first node. Then you need to run the txkSOHM.pl from $FND_TOP/patch/115/bin which will create 8.0.6 and IAS config homes for your application system.
Multinode to single node(multinode appltop to single appltop)
1)Maintain snapshot information
Log in as the applications user on each application tier node and run ‘Maintain Snapshot Information’ by using adadmin.
2) Merge existing APPL_TOPs
Log in to the primary node of your application tier as the application user user and run:
$ cd [COMMON_TOP]/admin/scripts/[CONTEXT_NAME]
$ perl adpreclone.pl appsTier merge
This will prompt you with option to merge secondary nodes
Now log in as the applications user to each of the secondary application tier nodes being merged and run:
$ cd [COMMON_TOP]/admin/scripts/[CONTEXT_NAME]
$ perl adpreclone.pl appltop merge
$ perl adpreclone.pl appltop merge
4) Prepare the source system database tier.
Log on to the database tier of the source system as the oracle user and run the following commands:
$ cd [RDBMS ORACLE_HOME]/appsutil/scripts/[CONTEXT_NAME]
$ perl adpreclone.pl dbTier
$ perl adpreclone.pl dbTier
With this all the pre clone tasks on the source system have been completed.
Steps to be performed on target system
5)Create OS user accounts
Create a OS user account for your applications
$ useradd -g dba -d [home_directory] -p password username
Similarly create a OS user account for your database
copy the required tops from
Copy the following application tier directories from the primary node of your source system to the target application tier node, retaining the original directory structure:
– [APPL_TOP]
– [OA_HTML]
– [OA_JAVA]
– [COMMON_TOP/util]
– [COMMON_TOP/clone>
– [806 ORACLE_HOME]
– [iAS ORACLE_HOME]
– [OA_HTML]
– [OA_JAVA]
– [COMMON_TOP/util]
– [COMMON_TOP/clone>
– [806 ORACLE_HOME]
– [iAS ORACLE_HOME]
6. Copy the required files for merging
Log in as the applications user to each of the secondary source nodes and recursively copy:
directory [COMMON_TOP]/clone/appl
- to -
directory [COMMMON_TOP]/clone/appl on the target system node
- to -
directory [COMMMON_TOP]/clone/appl on the target system node
Before proceeding with the next steps you must shutdown your oracle applications services and the database on the source system
7. Copy the database tier file system
Log on to the source system as the database user
Copy the database (DBF) files from the source to the target system
Copy the source database ORACLE_HOME to the target system
Copy the source database ORACLE_HOME to the target system
After this you can now startup the database and applications services on your source system and release it for use.
8. Configure the target system database server
Log on to the target system as the database user and type the following commands to configure and start the database:
$ cd [RDBMS ORACLE_HOME]/appsutil/clone/bin
$ perl adcfgclone.pl dbTier
$ perl adcfgclone.pl dbTier
This will prompt for new ORACLE_SID,ORACLE_HOME,Port Pool,JAVA_TOP and DATA_TOP give the appropriate values matching your target system
Once successful this should start your database and listener
9. Configure the application tier server nodes
The database and its listener should remain up before executing the next set of commands.
Log in to the merged APPL_TOP node as the applications user and execute the following commands:
Log in to the merged APPL_TOP node as the applications user and execute the following commands:
$ cd [COMMON_TOP]/clone/bin
$ perl adcfgclone.pl appsTier
$ perl adcfgclone.pl appsTier
This will prompt you new port pool for applictaion tier services as well as new APPLTOP,COMMON_TOP,ORACLE_HOME and IAS_TOP
Successful completion of this task will bring up your application tier services on the target or the cloned node.
Post-cloning Tasks
Log in to the target system application tier node as the APPLMGR user.
Run the following tasks in adadmin for all products:
- generate JAR files
- generate message files
- relink executables
- copy files to destination
Run the following tasks in adadmin for all products:
- generate JAR files
- generate message files
- relink executables
- copy files to destination
- Remove the temporary directory [COMMON_TOP]/clone/appl to reduce disk space usage.
Note: Rapid clone takes care of the site level profile options all other profile options need to be manually updated.
Unified APPL_TOP in R12
Unified APPL_TOP is different from separate APPL_TOP in Oracle Applications 11i. Unified APPL_TOP make more sense if you are using multi node Oracle Applications R12.
In Oracle Applications 11i , in multi node installation each APPL_TOP have its different name and files in each APPL_TOP will depend on type of Node (i.e. Forms Node will have fmx or forms related files where as APPL_TOP belonging to CM only node will have rdf or files required to run CM node)
Starting from R12, it will use Unified APPL_TOP which means all files required for all middle tier services are included in all nodes of Multi Node installation (irrespective of services running on that node)
What are few changes because of Unified APPL_TOP?
During Cloning of multi node Oracle Application install, only one copy (any one appl_top) of Application Node files need to copied to target instance.
During Cloning of Multi Node to Single Node you don’t have to merge APPL_TOP’s in R12 as required in 11i .
Services start/stop If you are using adstrtall.sh to start services on a node then it will start services which were configured to start during install on that node (You can still start a specific service even though it was not suppose to configure/start by calling startup script of that specific services).
To explain this better, lets assume you installed multi node R12 instance with Node 1 as Forms & Web Server where as Node 2 was installed with Concurrent Manager. Now on Node1 when you use adstrtall.sh script to start services as expected it will start Forms and Web services but unlike 11i, You can still start Concurrent Manager on Node1 by running adcmctl.sh
–FND_NODES From R12 all nodes will have Y against all services (For multi-node) in FND_NODES table.
To explain this better, lets assume you installed multi node R12 instance with Node 1 as Forms & Web Server where as Node 2 was installed with Concurrent Manager. Now on Node1 when you use adstrtall.sh script to start services as expected it will start Forms and Web services but unlike 11i, You can still start Concurrent Manager on Node1 by running adcmctl.sh
–FND_NODES From R12 all nodes will have Y against all services (For multi-node) in FND_NODES table.
No comments:
Post a Comment