Vous êtes sur la page 1sur 13

Oracle Applications 11i clone Document

Author:
Document Ref:
Version:

Muneer Dar
Clone Document for Oracle apps 11i
1.0

Note: This clone Document to specific to TESTATFL instance. Make necessary changes if you
are cloning to DEV or some other instance.

Document Format Control


Change Record
Date

Author

Version

23-Nov-2010

Muneer Ahmad Dar

1.0

Change Reference

Reviewers
Name

Position

Pradeep Ragupathy

Senior Analyst.

Pre clone Steps.


Execute adpreclone.pl on DB and Apps Tier before copying the file system to test server.

On Production server [Apps Tier] [as appprdal]


$ cd $COMMON_TOP/admin/scripts/$CONTEXT_NAME
$ perl adpreclone.pl appsTier

On Production server [DB Tier] [as oraprdal]


$ $ORACLE_HOME/appsutil/scripts//$CONTEXT_NAME
$ perl adpreclone.pl dbTier

Take Backup of below Files on DB and Apps Tier on TESTATFL


Create a backup folder under /appltest/testatfl/idba with name as date of clone. Eg 22NOV10
Backup below files to /appltest/testatfl/idba/22NOV10 folder.
Location :- $APPL_TOP
TESTATFL_qasbl.env
TESTATFL.env
APPSTESTATFL_qasbl.env
APPSORA.env
Location :- $APPL_TOP/admin
TESTATFL_qasbl.xml
adovars.env
Location :- $TNS_ADMIN
listener.ora
tnsnames.ora
Similarly on DB side, take backup of parameter file, context file, env file, listener.ora and tnsnames.ora

On Testserver
1. Bring the Listner and Apps tier services down.
2. Bring the Test Database down.
3. Remove the Data files and application tops.

Starting the Restoration using RMAN On Testserver [as 'oratest' user]:


Prepare RMAN Restoration script. Make sure the data file count in script matches with data file count
in production. Here is a sample restoration script.

Restoration_script.tx
t

We are going to Restore the Database using production SID. So Set the Environment as PRODATFL
and startup instance in nomount mode.
$ export ORACLE_SID=PRODATFL
$ sqlplus '/as sysdba'
SQL> startup nomount
SQL>exit
Restore the control file by connecting to rman.
$ rman target /
Recovery Manager: Release 10.2.0.4.0 - Production on Sat Nov 20 11:28:34 2010
Copyright (c) 1982, 2007, Oracle. All rights reserved.
connected to target database: PRODATFL (not mounted)
# Set the Database id. We can get DBID from production by using select dbid from v$database;
RMAN> set DBID= 350174392
# Restore control file. Go to RMAN backup location and do ls ltr PRODATFL_data_control*
Take the control file backup piece which is more recent.
RMAN> restore controlfile from '/oratest/testatfl/backup/PRODATFL_data_control_1598_1_nqk;

# Mount the Database once control files are restored.


RMAN> mount database;
If the RMAN Backup location on test server is different from production server, Use below command
to update the new path in RMAN Catalog.
RMAN> catalog start with '/oratest/testatfl /backup' noprompt;
Now exit the RMAN prompt and run the rman data file restore script which you created earlier.
$ nohup sh restore_test.sh &

Do tail f to rman logfile in another session and monitor the Data file restoration process.
Once All the Data files are restored, the recovery should take place automatically as we have included
recover database command in restore script. If due to some issue, recovery is did not happened
automatically, recover the database manually and open the database with reset logs option.
Verify All the datafiles are online. Compare datafile count with production.
Next we need to rename the Database from PRODATFL to TESTATFL.
Take the trace backup of control file as below.
Sql> alter database backup controlfile to trace as /oratest/testatfl/Control_file.sql;
Now edit this control file trace and prepare a control file creation script.
Change the CREATE CONTROLFILE statement to below.
CREATE CONTROLFILE SET DATABASE "TESTATFL " RESETLOGS NOARCHIVELOG

Now shutdown the Database which is running on PRODATFL SID and take backup of existing control
files. ( Nothing to do with Production Instance. So be careful here.)
$ sqlplus '/as sysdba'
SQL>shutdown immediate
SQL> exit
Now start the instance in nomount mode using TESTATFL sid and run control file script.
$ export ORACLE_SID=TESTATFL
$ sqlplus '/as sysdba'
SQL>startup nomount;
SQL> @/oratest/testatfl/Control_file.sql
Once control files are created, open the TESTATFL database using resetlogs option.
SQL> alter database open resetlogs;

Add Temp file on TESTATFL:


SQL> alter tablespace TEMP add tempfile '/oratest/testatfl/datafile/data/temp01.dbf ' size 3000m;
SQL> alter tablespace TEMP add tempfile '/oratest/testatfl/datafile/data/temp02.dbf size 3000m;

Change Global Name of the TESTATFL on Testserver:


SQL> ALTER DATABASE RENAME GLOBAL_NAME TO "TESTATFL.atfoods.com";
SQL> select GLOBAL_NAME from GLOBAL_NAME;
GLOBAL_NAME
-----------------------------------------TESTATFL.ATFOODS.COM

Starting Listener on Testserver:


$ lsnrctl start TESTATFL

Post DB clone steps.


1. Clean the FND_NODES table
Sqlplus apps/apps
SQL>Exec fnd_conc_clone.setup_clean
2. Run cmclean.sql.
SQL>@cmclean.sql
3. Concurrent manager may not come up sometimes and it would populate the below error
message in concurrent log file.
------------------------------------------------------------------------------------------------------------------Could not initialize the Service Manager FNDSM_QASBL_TESTATFL. Verify that QASBL has been registered for concurrent processing.
Routine AFPEIM encountered an error while starting concurrent manager RCVOLTM with library
/appltest/testatfl/appsfiles/testatflappl/po/11.5.0/bin/RCVOLTM.
Check that your system has enough resources to start a concurrent manager process. Contact your sy : 18-MAR-2011 19:49:27
Could not find service instance context for service instance number 1059
Could not find service instance context for service instance number 1058
Could not find service instance context for service instance number 1057
Could not find service instance context for service instance number 1054
Could not find service instance context for service instance number 1023
Starting FNDCRM Concurrent Manager : 18-MAR-2011 19:49:27
Could not initialize the Service Manager FNDSM_QASBL_TESTATFL. Verify that QASBL has been registered for concurrent processing.
Routine AFPEIM encountered an error while starting concurrent manager FNDCRM with library
/appltest/testatfl/appsfiles/testatflappl/fnd/11.5.0/bin/FNDCRM.
Check that your system has enough resources to start a concurrent manager process.

------------------------------------------------------------------------------------------------------------------Confirm the below select query not returning any rows.


SELECT concurrent_queue_name
FROM fnd_concurrent_queues
WHERE concurrent_queue_name LIKE 'FNDSM%';
Run the below script to update fnd_concurrent_queues.
cd to $FND_TOP/patch/115/sql
Run the script: afdcm037.sql

Startup the concurrent manager.

Once the Customer acknowledges us that the Apps backup has been restored
successfully on Test server we can precede further.
Rename the Application tops if not done by customer.
$ mv prodatflappl testatflappl
$ mv prodatflcomn testatflcomn
$ mv prodatflora testatflora
Check the ownership of Application tops. Change the ownership if not set to uid=102(appltest)
gid=100(dba)

Set enviromant and Run adcfgclone.pl as appltest


$ cd $COMMON_TOP/clone/bin
$ perl adcfgclone.pl appsTier /appltest/testatfl/idba/22NOV10/TESTATFL_qasbl.xml

Bring Apps services down on Testserver:


$ cd $COMMON_TOP/admin/scripts/$CONTEXT_NAME
$ ./adstpall.sh apps/<apps Password>

Run adautocfg.sh [as appltest]


$ cd $COMMON_TOP/admin/scripts/$CONTEXT_NAME
$ ./adautocfg.sh

Run adautocfg.sh [as oratest]


$ cd $ORACLE_HOME/appsutil/scripts/ /$CONTEXT_NAME
$ ./adautocfg.sh

Update Concurrent tables .


SQL> Update fnd_concurrent_processes set NODE_NAME='QASBL' Where NODE_NAME in
(PRODEBS, PRODEBS1, ATFLPRODAPPL);
SQL> Update fnd_concurrent_processes set DB_INSTANCE='TESTATFL' Where
DB_INSTANCE='PRODATFL';

SQL> Update fnd_concurrent_queues set NODE_NAME= 'QASBL' Where NODE_NAME in


(PRODEBS, PRODEBS1, ATFLPRODAPPL);
a) Set Terminating or Running to Completed/Terminated
SQL> UPDATE fnd_concurrent_requests SET phase_code = 'C', status_code = 'X' WHERE status_code ='T' OR
phase_code = 'R';

b) Place Pending/(Normal/Standby) to On Hold


SQL> UPDATE fnd_concurrent_requests SET hold_flag = 'Y' WHERE phase_code = 'P' AND status_code in ('Q','I');
SQL> commit;

Setting Custom Top:


$ cd $APPL_TOP
$ ls customPRODATFL_atflprodappl.env
Note: You will find a custom file of production instance which we need to rename as follows and the
contents of the file should be as follows.You can get the customer environment details from
APPSORA.env.Correct the custom Top in that env file.
$ cp customPRODATFL_atflprodappl.env customTESTATFL_qasbl.env
$ cat customTESTATFL_qasbl.env
ATFL_TOP="/appltest/testatfl/appsfiles/testatflappl/xxatfl/11.5.0"
export ATFL_TOP
Go to $IAS_ORACLE_HOME/Apache/Jserv/etc and take a backup of formservlet.ini and edit the file
make sure all the TOPs are pointing to TESTATFL directory file system.

Start up Apps Services on Testserver:


$ cd $COMMON_TOP/admin/scripts/$CONTEXT_NAME
$ adstartall.sh apps/<apps pwd>

Update the Site profile


Change the Site level profile value to TESTATFL

Perform Health Check:


Perform Health Check by submitting the Active Users Conc. Request.

Post Clone Steps for Workflow, Discover etc.


Drop the DB links that point to Siebel.
SQL> select DB_link from user_db_links order by created;
DB_LINK
-------------------------------------------------------------------------------DB_LINK.US.ORACLE.COM
DB_LINK1.US.ORACLE.COM
APPS_TO_APPS.US.ORACLE.COM\EDW_APPS_TO_WH.US.ORACLE.COM
DB_TEST.ATFOODS.COM
SIEBELDB.ATFOODS.COM
APPS_TO_APPS.ATFOODS.COM
EDW_APPS_TO_WH.ATFOODS.COM
ASCPDB.ATFOODS.COM
DMDB.ATFOODS.COM
SQL> drop database link SIEBELDB;
SQL> drop database link ASCPDB;
SQL> drop database link DMDB;
You may need to recreate these database link pointing it the DEV or QA Instance with the same name.
Check with customer for this requirement after clone.

Workflow Mailers Setup.


Exiting prod setup

Exiting DEV Instance Setup


In order to bring up the workflow services in DEV or QA
1. Inbound configuration needs to changed.
2. set override address need to be done otherwise the mails will float to the end users from
DEV or QA.
Navigation is System Administrator Workflow Notification Mailers Click on Edit Button

Navigation is System Administrator Workflow Notification Mailers Click on View Details button

Discoverer Setup
Mv the earlier Dbc of the cloned environment in demoebs.atfoods.com
discoverer. Please see below for location
/eddevora/oracle/BIHome_1/discoverer/secure
Copy the dbc file from the cloned environment to the
/eddevora/oracle/BIHome_1/discoverer/secure location.

And change the profile options values as follows


ICX: Discoverer Launcher : http://demoebs.atfoods.com:7778/discoverer/plus?
Connect=[APPS_SECURE]
ICX: Discoverer Viewer Launcher:
http://demoebs.atfoods.com:7778/discoverer/viewer?Connect=[APPS_SECURE]

1. Profiles that needs to be checked on EBS target environment (Cloned)side


Profile Vaule
ICX: Default Discoverer Workbook
Owner
ICX: Discoverer Default End User
Layer Schema Prefix
ICX: Discoverer EBS End User
Layer Schema Prefix
ICX: Discoverer EDW End User
Layer Schema Prefix
ICX: Discoverer End User Layer
Language Override
ICX: Discoverer Release
ICX: Discoverer OLTP End User
Layer Schema Prefix

Site Level
EUL_US
EUL
EUL
EUL
American English
10
EUL

For the following responsibilities the profile option needs to be change at


the Responsibility level
1.
2.
3.
4.
5.
6.

Discoverer Plus ATFL


Discoverer Plus Finance
Discoverer Plus Logistics
Discoverer Plus Procurement
Discoverer Plus Quality Assurance
Discoverer Plus Sales

For ex:

Known Issues:
After application clone all concurrent managers are not coming up and ICM log files shows the
following error message
----------------------------------------------------------------------------------------------Process monitor session ended : 17-MAR-2011 07:45:08
Process monitor session started : 17-MAR-2011 07:47:08
Could not contact Service Manager FNDSM_QASBL_TESTATFL. The TNS alias could not be
located, the listener process on QASBL could no
t be contacted, or the listener failed to spawn the Service Manager process.
Process monitor session ended : 17-MAR-2011 07:47:09
Process monitor session started : 17-MAR-2011 07:49:09
Could not contact Service Manager FNDSM_QASBL_TESTATFL. The TNS alias could not be
located, the listener process on QASBL could no
t be contacted, or the listener failed to spawn the Service Manager process.
Process monitor session ended : 17-MAR-2011 07:49:09
Process monitor session started : 17-MAR-2011 07:51:09
Could not contact Service Manager FNDSM_QASBL_TESTATFL. The TNS alias could not be
located, the listener process on QASBL could no
t be contacted, or the listener failed to spawn the Service Manager process.
For this Error
Connect to SQLPLUS as APPS user and run the following statement :
select CONCURRENT_QUEUE_NAME from FND_CONCURRENT_QUEUES where
CONCURRENT_QUEUE_NAME like 'FNDSM%';
If the above SQL does not returning any value then please follow the metalink note id
After Doing a Clone All the Concurrent Managers Do Not Start (Doc ID 555081.1)

Vous aimerez peut-être aussi