Step by step Oracle Apps R12.1.3 Hot Cloning (PROD to DEV)


                      HOT CLONING OF ORACLE APPS R12.1.3          

                     FILE SYSTEM IS SAME (FRESH CLONING)

 #  Hot Cloning PROD to DEV Server.
 #  Database will be backed up using Online.
 # 
Application File system will be backed up when all services are up and running.

Source system - Existing system for which you want to create a new copy
target system - New system on which clone is prepared

Oracle E-Business suite environment using online backup.

Source and Target system Information:

 Server info.                     Source Server Information
       Target Server  Information
IP & Host Name
192.34.201.01 / PROD01
                   192.34.201.03/DEV03
DB_Tier Location
/P01/oracle/PROD/db/tech_st/11.1.0

/TO1/oracle/DEV/db/tech_st/11.1.0 
Apps user/pass
 applmgr/XXXX
 Appldev/XXXX
Apps_Tier Location
/P01/oracle/PROD/apps/apps_st/appl

 /T01/oracle/Dev/apps/apps_st/appl
OS Users/Group
uid=105(applmgr) gid=104(dba) groups=1(staff)
 uid=304(applmgr) gid=305(dba) groups=1(staff)
Mount point path
 XXXX
 XXXX
DB & Web Port
XXXX
 XXX
OS Version
LINUX
LINUX
Apps version
12.1.3
12.1.3
DB version
 11.1
 11.1
DB_SID
PROD
DEV
System Port Pool
22
33
DB User/pass
Oracle/XXXX
Oradev/XXXX




PREREQUISITES:-
                                         SOURCE System Side

#. Check Database Name:-
SQL> select open_mode, name from v$database;

OPEN_MODE  NAME
---------- ---------
READ WRITE PROD

#. Database must be in Archive log mode and running.

The following are the steps required to enable archive log mode on an Oracle 10g or 11g database.
Verify the database log mode.
[oracle@ora1 ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Thu Apr 8 12:02:52 2010
Copyright (c) 1982, 2009, Oracle.  All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> archive log list
Database log mode              No Archive Mode
Automatic archival             Disabled
Archive destination            USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence     25
Current log sequence           27
SQL>

OR
Lets start by checking the current archive mode.


SQL> SELECT LOG_MODE FROM SYS.V$DATABASE;

LOG_MODE
------------
NOARCHIVELOG

So we're in NOARCHIVELOG mode and we need to change.

Now we shutdown the database and bring it backup in mount mode.

SQL> shutdown immediate

Database closed.
Database dismounted.
ORACLE instance shut down.

SQL> startup mount
ORACLE instance started.

Total System Global Area  184549376 bytes
Fixed Size                  1300928 bytes
Variable Size             157820480 bytes
Database Buffers           25165824 bytes
Redo Buffers                 262144 bytes
Database mounted.

SQL> alter database archivelog;
Database altered.

SQL> alter database open;
Database altered.

Using these tables we can verify that we are infact in ARCHIVELOG mode.


SQL> select log_mode from v$database;

LOG_MODE
------------
ARCHIVELOG

#. All the services must be running.
check your DB status Database must be Up & Running.
SQL> select status from v$instance;
ps -ef | grep pmon
select * from v$database
ps -ef |grep ora
ps -ef |grep ora_

Run clone preparation script (adpreclone.pl) on database and application Tier

#. Run adperclone on db tier and apps tier

Oracle$ perl adpreclone.sh dbTier ($ORACLE_HOME/appsutil/scripts//)

Example like this:-
[oracle@sujeet ~]$ cd /oracle/idea/db/tech_st/11.1.0/appsutil/scripts/idea_sujeet

[oracle@sujeet idea_sujeet]$ perl adpreclone.pl dbTier
Enter the APPS User Password:apps
 59% completed       
 
Completed Stage...
Fri Nov 25 10:26:17 2011

#. Run adperclone on apps tier

Applmgr$ perl adpreclone.sh appsTier ($COMMON_TOP/admin//)
Example like this:-

[oracle@sujeet /]$ cd /oracle/idea/apps/apps_st/appl/
[oracle@sujeet appl]$ . APPSidea_sujeet.env 
[oracle@sujeet appl]$ cd $ADMIN_SCRIPTS_HOME 
 
[oracle@sujeet scripts]$ perl adpreclone.pl appsTier
 
 /     80% completed       
Completed Stage...
Fri Nov 25 11:23:39 2011

#. Take Full Back through (Alter the database to begin backup mode) 

SQL> alter database begin backup;


#.  Copy all the *.DBF and .log to a new folder 

Like use cp -r command 
#. Make trace file of control file

SQL>alter database backup controlfile to trace;

OR

Take the controlfile backup using the following:

SQL>alter database backup controlfile to trace as '/tmp/control.sql';


#. Copy the trace file to the folder

SQL>alter database end backup

• 

#. Copy the APPS TIER to the folder

Bring all the services down

$sh adstpall.sh apps/apps

#. Copy the apps tier

[oracle@sujeet ~]$ Cp /u01/PROD/oracle /u03/DEV/



                                           TARGET System Side


#. Run adcfgclone.pl on the database tier


CONFIGURE THE TARGET SYSTEM DATABASE NODE:-
 
[oracle@sujeet ~]$ cd /R12_clone/idea/db/tech_st/11.1.0/appsutil/clone/bin/
 
[oracle@sujeet bin]$ ls
adcfgclone.pl  adchkutl.sh  adclonectx.pl  adclone.pl
 
[oracle@sujeet bin]$ perl adcfgclone.pl dbTechStack
 
Enter the APPS password :apps
Target System Hostname (virtual or normal) [sujeet] : 
Target Instance is RAC (y/n) [n] : n
Target System Database SID : idea
Target System Base Directory : /R12_clone/idea
Target System utl_file_dir Directory List : /tmp
Number of DATA_TOP's on the Target System [1] : 
Target System DATA_TOP Directory 1 [/oracle/idea/db/apps_st/data] : /R12_clone/idea/db/apps_st/data
Target System RDBMS ORACLE_HOME Directory [/R12_clone/idea/db/tech_st/11.1.0] : 
Do you want to preserve the Display [null] (y/n) ? : n
Target System Display [sujeet:0.0] : 
Target System Port Pool [0-99] : 11
15% completed       
 
Completed Apply...
Fri Nov 25 14:16:38 2011


#. Edit the trace control file

DELETE THE LINES ABOVE STARTUP NOMOUNT
Remove REUSE by SET
Change the SID NAME( PROD to TEST)
Change noresetlog to resetlog
DELETE ALL THE LINES BELOW CHARACTER SET

#. Manually create the control file form trace.

Oracle$ sqlplus “/as sysdba”
SQL> startup nomount
SQL> @cont.sql

After running control file will be created and the database will mount itself.
#. Now we need to recover the database.

SQL> recover database using backup controlfile until cancel;

#. After recovery open the database with resetlogs
SQL> alter database open resetlogs;

#.CONFIGURE THE TARGET SYSTEM APPLICATION NODE

 
[oracle@sujeet ~]$ cd /R12_clone/idea/apps/apps_st/comn/clone/bin
 
[oracle@sujeet bin]$ perl adcfgclone.pl appsTier
 
Enter the APPS password : apps
Target System Hostname (virtual or normal) [sujeet] : 
Target System Database SID : idea
Target System Database Server Node [sujeet] : 
Target System Base Directory : /R12_clone/idea
Target System Tools ORACLE_HOME Directory [/R12_clone/idea/apps/tech_st/10.1.2] : 
Target System Web ORACLE_HOME Directory [/R12_clone/idea/apps/tech_st/10.1.3] : 
Target System APPL_TOP Directory [/R12_clone/idea/apps/apps_st/appl] : 
Target System COMMON_TOP Directory [/R12_clone/idea/apps/apps_st/comn] : 
Target System Instance Home Directory [/R12_clone/idea/inst] : 
Target System Root Service [enabled] : 
Target System Web Entry Point Services [enabled] : 
Target System Web Application Services [enabled] : 
Target System Batch Processing Services [enabled] : 
Target System Other Services [disabled] : 
Do you want to preserve the Display [sujeet:0.0] (y/n) ? : y
RC-00217: Warning: Configuration home directory (s_config_home) evaluates to /R12_clone/idea/inst/apps/idea_sujeet. A directory with this name already exists and is not empty.
Do you want to continue (y/n) ?  : y
Target System Port Pool [0-99] : 11
Checking the port pool 11
done: Port Pool 11 is free
Report file located at /R12_clone/idea/inst/apps/idea_sujeet/temp/portpool.lst
Complete port information available at /R12_clone/idea/inst/apps/idea_sujeet/temp/portpool.lst
 
UTL_FILE_DIR on database tier consists of the following directories.
 
1. /usr/tmp
2. /tmp
3. /R12_clone/idea/db/tech_st/11.1.0/appsutil/outbound/idea_sujeet
4. /usr/tmp
Choose a value which will be set as APPLPTMP value on the target node [1] :  
 

#.CHECK APPLICATION LOGIN PAGE WORKS
 
OPEN mozilla
URL:-http://sujeet.oracle.com:8011/
HOME PAGE OPEN
 
USER:-sysadmin
password:-sysadmin



                                            POST CLONE TASK

#. Update profile options

Rapid Clone updates only site level profile options. If any other profile options are set to instance specific values, you must update them manually.

#. Procedure: log into system administrator responsibility > profile > system

Check the profile options at application or responsibility or user level, which profile option you want to update
Change site NAME
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 15-Dec-10”

Connect to System Administrator

Profile – System







NOTE: In Real Time we need to perform some steps after before running the Autoconfig on Application Tier. The steps are as bellows.





Change Password:-

[oracle@sujeet 11.1.0]$ FNDCPASS apps/apps 0 Y system/manager SYSTEM APPLSYS appsclone

We need to run the below script as apps user. We need to download this script from meta-link.

#. Clean Concurrent Manager:-

[app@linux2 ~] sqlplus
SQL > conn apps/apps
SQL > @?/RAPIDMAGIC/admin/cmclean.sql.

#. Purge fnd_nodes.

SQL > exec fnd_conc_clone.setup_clone();
Check front hand:-
1.       Check Java Form opening or Not.
2.       Run Concurrent Program any.
3.       Active User Request run
4.       Check Profile setting if any.

Oracle Application Dashboard for clone:



#. Update printers settings

If new printer is added to the application then we need to update and configure the new printer on the application.

#. Verify $APPLCSF variable

Check if UNIX$ cd $APPLCSF is taking you to the correct DIR. If not then you need to edit the $APPL_TOP/.env

After editing we need to run autocongif

#. Update workflow configuration

We need to configure the workflow.

#. Set SESSION_COOKIE_DOMAIN from ICX_PARAMETERS

#. Select SESSION_COOKIE_DOMAIN from ICX_PARAMETERS;

If this returns a NULL value then set this to be your domain name, with a leading full stop.

For example:-

o update ICX_PARAMETERS set SESSION_COOKIE_DOMAIN = '.localhos.com';
You need to commit this update.


**********************************END***************************************************


NOTE:-

dbTier

dbTier – It will register the oracle_home, It will relink the oracle_home, it will recreate the control files, configure the db and start the listener.
dbTeckStack - It will not create control files, rest are all same as above. That is why we are choosing this, because with the help of adcrdbclone.sql we are going to create control files while auto config is running (End of Cloning).
dbconfig – it will only configure the db.
database -   it will configure db as well as start the listener.

appsTier

appsTier - It will register the oracle_home, It will relink the oracle_home, it will create INST_TOP, configure the APPL_TOP and start the apps process. We need INST_TOP that’s why we choosed this.

atTechStack – It will not create INST_TOP, rest are all same as above. 

*********************************************************************************

No comments:

ORA-01552: cannot use system rollback segment for non-system tablespace 'TEMP'

 ORA-01552: cannot use system rollback segment for non-system tablespace "string" Cause: Used the system rollback segment for non...