Share the content if you found it is useful (You can share using 300 community websites) click "share" at the end of the post.

You are encouraged to leave a comment.








Tuesday, April 14, 2009

All about Trace....

1. What is a trace file?
A trace file is a log of SQL run in a particular session or sessions focused on selects, inserts, updates, and deletes. A trace file can be used in many circumstances including reviewing performance, finding tables and views referenced, or finding the root of an error. More details about trace files can be read in the database user's guide related to your version.


-- Example #1: ORA-Error
The following is an snippet from a trace file that had an Oracle standard error. In this case it is a unique constraint violation, ORA 1 unique constraint.

See the line: ERROR #117:err=1 tim=1443801753. The ERROR flags the line and the 'err=1' lists the Oracle error as ORA-1:
=====================

PARSING IN CURSOR #117 len=1828 dep=1 uid=173 oct=2 lid=173 tim=1203661932011076 hv=1015075934 ad='cc60a820'INSERT INTO BOM_SUB_OPERATION_RESOURCES (OPERATION_SEQUENCE_ID, SUBSTITUTE_GROUP_NUM, RESOURCE_ID, SCHEDULE_SEQ_NUM, REPLACEMENT_GROUP_NUM, ACTIVITY_ID, STANDARD_RATE_FLAG, ASSIGNED_UNITS, USAGE_RATE_OR_AMOUNT, USAGE_RATE_OR_AMOUNT_INVERSE, BASIS_TYPE, SCHEDULE_FLAG, LAST_UPDATE_DATE, LAST_UPDATED_BY, CREATION_DATE, CREATED_BY, LAST_UPDATE_LOGIN, RESOURCE_OFFSET_PERCENT, AUTOCHARGE_TYPE, ATTRIBUTE_CATEGORY, REQUEST_ID, PROGRAM_APPLICATION_ID, PROGRAM_ID, PROGRAM_UPDATE_DATE, ATTRIBUTE1, ATTRIBUTE2, ATTRIBUTE3, ATTRIBUTE4, ATTRIBUTE5, ATTRIBUTE6, ATTRIBUTE7, ATTRIBUTE8, ATTRIBUTE9, ATTRIBUTE10, ATTRIBUTE11, ATTRIBUTE12, ATTRIBUTE13, ATTRIBUTE14, ATTRIBUTE15, PRINCIPLE_FLAG, SETUP_ID, CHANGE_NOTICE, ACD_TYPE, ORIGINAL_SYSTEM_REFERENCE ) SELECT DISTINCT A.OPERATION_SEQUENCE_ID, B.SUBSTITUTE_GROUP_NUM, D.RESOURCE_ID, B.SCHEDULE_SEQ_NUM, B.REPLACEMENT_GROUP_NUM, B.ACTIVITY_ID, B.STANDARD_RATE_FLAG, B.ASSIGNED_UNITS, B.USAGE_RATE_OR_AMOUNT, B.USAGE_RATE_OR_AMOUNT_INVERSE, B.BASIS_TYPE, B.SCHEDULE_FLAG, SYSDATE, :B4 , SYSDATE, :B4 , NULL, B.RESOURCE_OFFSET_PERCENT, B.AUTOCHARGE_TYPE, B.ATTRIBUTE_CATEGORY, FND_GLOBAL.CONC_REQUEST_ID, NULL, FND_GLOBAL.CONC_PROGRAM_ID, SYSDATE, B.ATTRIBUTE1, B.ATTRIBUTE2, B.ATTRIBUTE3, B.ATTRIBUTE4, B.ATTRIBUTE5, B.ATTRIBUTE6, B.ATTRIBUTE7, B.ATTRIBUTE8, B.ATTRIBUTE9, B.ATTRIBUTE10, B.ATTRIBUTE11, B.ATTRIBUTE12, B.ATTRIBUTE13, B.ATTRIBUTE14, B.ATTRIBUTE15, B.PRINCIPLE_FLAG, B.SETUP_ID, DECODE (:B2 , 1, B.CHANGE_NOTICE, :B3 ), DECODE (:B2 , 1, B.ACD_TYPE, 1), B.ORIGINAL_SYSTEM_REFERENCE FROM BOM_OPERATION_RESOURCES A, BOM_SUB_OPERATION_RESOURCES B, BOM_RESOURCES C, BOM_RESOURCES D WHERE A.LAST_UPDATED_BY = B.OPERATION_SEQUENCE_ID AND B.RESOURCE_ID = C.RESOURCE_ID AND C.RESOURCE_CODE = D.RESOURCE_CODE AND D.ORGANIZATION_ID = :B1 AND NVL (D.DISABLE_DATE, SYSDATE + 1) > SYSDATEEND OF STMTEXEC
#117:c=2099681,e=2436776,p=315,cr=5416,cu=19,mis=0,r=0,dep=1,og=1,tim=1203661932011073ERROR #117:err=1 tim=1443801753
=====================
-- Example #2: Rollback
Another common thing to look for in trace files are rollbacks. There are several formats that you might see for a rollback including the word 'rollback' or text like 'XCTEND rlbk=1, rd_only=1'.
=====================

PARSING IN CURSOR #118 len=30 dep=1 uid=173 oct=45 lid=173 tim=1203661932011639 hv=4099445834 ad='0'ROLLBACK TO BEGIN_ROUTING_COPYEND OF STMTEXEC #118:c=0,e=124,p=0,cr=0,cu=21,mis=0,r=0,dep=1,og=0,tim=1203661932011637RPC EXEC:c=2105681,e=2524801BINDS #116:=====================

2. What are bind variables?
A bind variable is a substitution value used within a trace file. To improve performance, the Oracle database will reuse SQL substituting values for variables as necessary. For example, the same SQL statement could be run for each of your employees. The employee id might be a variable that is changed before you run each SQL. This could be translated to the database as a bind variable so that the same SQL can be used each time but the correct variable can be substituted just before the SQL is run. If someone requests that you enable bind variables for your trace file, this causes the database to document the substitution variables within the trace file as well as the SQL run. For example, we may see that a select statement ran against the employee table ten times, but without the binds, we would not know what employee was selected each time.
-- Example #1: Binds
Here is an example of a trace file with binds. In this example, we see a query against a table called MTL_SYSTEM_ITEMS_VL. Bind variables are used in the where-clause to substitute for the following

":num", ":SEGMENT1", and ":FND_FLEX_WHERE_BIND_0".
=====================

PARSING IN CURSOR #78 len=785 dep=0 uid=173 oct=3 lid=173 tim=1203661928858323 hv=3885565797 ad='d16ab6f8'SELECT ENABLED_FLAG, SUMMARY_FLAG, NVL(TO_CHAR(START_DATE_ACTIVE, 'J'), 0),NVL(TO_CHAR(END_DATE_ACTIVE, 'J'), 0),SEGMENT1, DESCRIPTION, PRIMARY_UOM_CODE, LOCATION_CONTROL_CODE, RESTRICT_LOCATORS_CODE, RESTRICT_SUBINVENTORIES_CODE, INVENTORY_ASSET_FLAG, product_family_item_id, BOM_ITEM_TYPE, SERIAL_NUMBER_CONTROL_CODE, INVENTORY_ITEM_ID FROM MTL_SYSTEM_ITEMS_VL WHERE ORGANIZATION_ID = :num AND SEGMENT1 = :SEGMENT1 AND ( bom_enabled_flag = 'Y' And bom_item_type <> 3 And pick_components_flag = 'N' And eng_item_flag = 'N' And not exists (Select null From bom_operational_routings bor Where bor.assembly_item_id = inventory_item_id And bor.organization_id = :FND_FLEX_WHERE_BIND_0 And bor.alternate_routing_designator is null And bor.routing_type <> 1) And eam_item_type IS NULL ) END OF STMTEXEC #78:c=0,e=108,p=0,cr=0,cu=0,mis=0,r=0,dep=0,og=1,tim=1203661928858320FETCH #78:c=0,e=76,p=0,cr=10,cu=0,mis=0,r=1,dep=0,og=1,tim=1203661928858425BINDS #78:kkscoacd Bind#0 oacdty=02 mxl=22(22) mxlc=00 mal=00 scl=00 pre=00 oacflg=01 fl2=1000000 frm=00 csi=00 siz=2056 off=0 kxsbbbfp=2a9cff79f0 bln=22 avl=03 flg=05 value=101 Bind#1 oacdty=01 mxl=32(15) mxlc=00 mal=00 scl=00 pre=00 oacflg=01 fl2=1000000 frm=01 csi=873 siz=0 off=24 kxsbbbfp=2a9cff7a08 bln=32 avl=09 flg=01 value="MRS6814MC" Bind#2 oacdty=01 mxl=2000(255) mxlc=00 mal=00 scl=00 pre=00 oacflg=01 fl2=1000000 frm=01 csi=873 siz=0 off=56 kxsbbbfp=2a9cff7a28 bln=2000 avl=03 flg=01 value="101"EXEC #78:c=0,e=81,p=0,cr=0,cu=0,mis=0,r=0,dep=0,og=1,tim=1203661928859390FETCH #78:c=0,e=36,p=0,cr=10,cu=0,mis=0,r=1,dep=0,og=1,tim=1203661928859438
=====================
-- Example #2: Binds
Here is another example where you see the bind numbers. This is more common. Note that the binds are off by one -- bind#0 goes with the variable :b1, bind#1 goes with variable :b2, etc.
=====================

PARSING IN CURSOR #128 len=863 dep=0 uid=173 oct=6 lid=173 tim=1203661928862922 hv=1516422370 ad='d1d91940'UPDATE BOM_OPERATIONAL_ROUTINGS SET ROUTING_SEQUENCE_ID = :b1,ASSEMBLY_ITEM_ID = :b2,ORGANIZATION_ID = :b3,ALTERNATE_ROUTING_DESIGNATOR = :b4,LAST_UPDATE_DATE = :b5,LAST_UPDATED_BY = :b6,LAST_UPDATE_LOGIN = :b7 WHERE ROWID = :b8 END OF STMTPARSE #128:c=0,e=442,p=0,cr=0,cu=0,mis=1,r=0,dep=0,og=1,tim=1203661928862919BINDS #128:kkscoacd Bind#0 oacdty=02 mxl=23(22) mxlc=00 mal=00 scl=00 pre=00 oacflg=03 fl2=1000000 frm=00 csi=00 siz=2200 off=0 kxsbbbfp=2a9cff7cd8 bln=23 avl=04 flg=05 value=30020 Bind#1 oacdty=02 mxl=23(22) mxlc=00 mal=00 scl=00 pre=00 oacflg=03 fl2=1000000 frm=00 csi=00 siz=0 off=24 kxsbbbfp=2a9cff7cf0 bln=23 avl=04 flg=01 value=13003 Bind#2 oacdty=02 mxl=23(22) mxlc=00 mal=00 scl=00 pre=00 oacflg=03 fl2=1000000 frm=00 csi=00 siz=0 off=48 kxsbbbfp=2a9cff7d08 bln=23 avl=03 flg=01 value=101 Bind#3 oacdty=01 mxl=2000(255) mxlc=00 mal=00 scl=00 pre=00 oacflg=03 fl2=1000000 frm=01 csi=873 siz=0 off=72 kxsbbbfp=2a9cff7d20 bln=2000 avl=00 flg=01 Bind#4 oacdty=12 mxl=07(07) mxlc=00 mal=00 scl=00 pre=00 oacflg=03 fl2=1000000 frm=00 csi=00 siz=0 off=2072 kxsbbbfp=2a9cff84f0 bln=07 avl=07 flg=01 value="1/21/2009 8:56:55" Bind#5 oacdty=02 mxl=23(22) mxlc=00 mal=00 scl=00 pre=00 oacflg=03 fl2=1000000 frm=00 csi=00 siz=0 off=2080 kxsbbbfp=2a9cff84f8 bln=23 avl=03 flg=01 value=1555 Bind#6 oacdty=02 mxl=23(22) mxlc=00 mal=00 scl=00 pre=00 oacflg=03 fl2=1000000 frm=00 csi=00 siz=0 off=2104 kxsbbbfp=2a9cff8510 bln=23 avl=04 flg=01 value=370867 Bind#7 oacdty=01 mxl=32(18) mxlc=00 mal=00 scl=00 pre=00 oacflg=03 fl2=1000000 frm=01 csi=873 siz=0 off=2168 kxsbbbfp=2a9cfef550 bln=32 avl=18 flg=01 value="AABDb6AAiAAAGBqAA3"
=====================

3. How does one enable trace in the Oracle Application screens / forms?
One can enable trace through the forms by using the Help menu, choosing the daignostics menu, trace and then selecting the appropriate trace for your needs. Most commonly if debugging an error, you should at least provide trace with binds. When debugging a performance issue, you may consider using trace with binds and waits. For example, the following is the navigation to enable trace in a form:

Goto the Oracle Applications Login
Open the form where the error occurs but do not yet cause the error.
Enable SQL*Trace by choosing
Help > Diagnostics > Trace > Trace with binds
A message appears indicating that the trace will be recorded Note the file name and location of the file Now reproduce the error. Once the error occurs, disable trace as soon as possible.
Disable SQL*Trace by choosing
Help > Diagnostics > Trace > Trace off
The same file name and location will be noted in case you need it again. Retrieve the trace file.

4. How does one enable trace for a concurrent program?
A simple way to enable trace in a concurrent program is to review the concurrent program definition and select trace enabled. This will enable trace without binds for all users that run the program. For example, the following steps could be used.

Goto Sysadmin > Concurrent > Program > Define
Query the concurrent program
Check the trace box to enable trace
If you require bind variables for your trace file from a concurrent program, a more sophisticated method is required as noted below.

5. How does one enable trace for a concurrent program INCLUDING bind variables and waits?
Trace can be enabled for a concurrent program by enabling trace on the program definition for all users as noted above, but this does not include bind variables or wait times. To enable trace with bind variables for a concurrent program, you may consider the following approach that uses the bde script for concurrent program tracing with binds and waits using event 10046 at level 12. *** This method will enable trace with binds for all new sessions and connections Download and review the script, bde_system_event_10046.sql,

from Note 179848.1.

Run the script and press enter when prompted:
SQL> bde_system_event_10046.sql

Return to the application Execute the concurrent program Monitor the program until it begins to run Return to SQL*Plus and press enter to cancel tracing new programs

6. How does one find a trace file for a concurrent program?
It is common for people to look for the last updated trace files or to use UNIX functions like 'grep' to parse the trace files looking for the one related to their concurrent program. However, the following SQL can be used to assist in identifying the trace file associated to a concurrent program. The SQL prompts the user for the request id and outputs the trace file name and location.
Warning: Some users have pointed out that this SQL does not always point out the exact filename and location. On a multi-node database environment, the user might not know what machine to look at. Also, the construction of the actual filename may be different on your environment as this is configurable. If your filenames are configured differently, you may want to use number part of the filename (the process id), then search for files in your trace directory with the same id.


A trick that may help you find the correct trace file directory is to enable trace via the Application user using
Help > Diagnostics > Trace > Trace On.
This will popup a window indicating the directory where trace files are written.Finally, the oracle_process_id is selected from v$process so this ID is only available during runtime of the process.It gets cleared shortly after the process terminated. Then you cannot find the trace file for a concurrent program anymore. Therefore, you should run this SQL shortly after running the concurrent program.

SQL> prompt accept request prompt 'Please enter the concurrent request id for the appropriate concurrent program:'

prompt column traceid format a8
column tracename format a80
column user_concurrent_program_name format a40
column execname format a15
column enable_trace format a12
set lines 80
set pages 22
set head off
SELECT 'Request id: 'request_id , 'Trace id: 'oracle_Process_id, 'Trace Flag: 'req.enable_trace, 'Trace Name: 'dest.value'/'lower(dbnm.value)'_ora_'oracle_process_id'.trc', 'Prog. Name: 'prog.user_concurrent_program_name, 'File Name: 'execname.execution_file_name execname.subroutine_name , 'Status : 'decode(phase_code,'R','Running') '-'decode(status_code,'R','Normal'), 'SID Serial: 'ses.sid',' ses.serial#, 'Module : 'ses.module from fnd_concurrent_requests req, v$session ses, v$process proc, v$parameter dest, v$parameter dbnm, fnd_concurrent_programs_vl prog, fnd_executables execname where req.request_id = &request and req.oracle_process_id=proc.spid(+) and proc.addr = ses.paddr(+) and dest.name='user_dump_dest' and dbnm.name='db_name' and req.concurrent_program_id = prog.concurrent_program_id and req.program_application_id = prog.application_id and prog.application_id = execname.application_id and prog.executable_id=execname.executable_id;

7. How does one enable trace for all actions that occur for a user?
One can enable trace for all actions that a user takes by setting a profile option for the user. See
Note 170223.1 for detailed screen shots.

This will function when the user logs into the Oracle Applications forms or when logging into the Self Service Web Applications. This method uses an Event Trace. The instructions for enabling the event trace follow: a. First enable trace for a specific user: -
Bring up the Core application - System Administrator responsibility - Move to Profile/System - Check off the USER box -
and enter your username that you are using when getting the error - Search on the following profile option -
'Initialization SQL Statement - Custom' Please set this at the user level with the following string:
BEGIN FND_CTL.FND_SESS_CTL('','', '', 'TRUE','','ALTER SESSION SET TRACEFILE_IDENTIFIER=''''''4269824.999' ''''' EVENTS ='''''' 10046 TRACE NAME CONTEXT FOREVER, LEVEL 12 '''''); END;


(Cut and paste the above sql statement into the User Level profile option: "Initialization SQL - Custom") This must be one complete line of text - so may be best to copy the string into notepad prior to putting it into the profile.

b. Once the profile is set, please change responsibilities and directly go and reproduce the problem. To locate the trace file, use the following sql in sqlplus:

SQL> select name, value from v$parameter where name like 'user_dump_dest';

- The value is the location of the trace file on the database server - Please move to this directory and search for the file having 4269824.999 in the filename - This is the trace file created - please tkprof and upload BOTH the raw and tkprof trace file to metalink.

c. Ensure that the profile option is unset before exiting the Application. This is a very important step. If this is not unset, unnecessary trace files will be generated.
d. Note that a similar technique can be used for enabling trace with binds for a user in SQL*Plus. The commands would look like the following:

SQL> ALTER SESSION SET TRACEFILE_IDENTIFIER='577' EVENTS ='10046 TRACE NAME CONTEXT FOREVER, LEVEL 12';
SQL> select 'x' from dual;
-- or any SQL that you want to trace
SQL> alter session set sql_trace = false;

8. How does one enable trace for a web-based screen like found in the self service applications?
Use the same method as noted above in "How does one enable trace for all actions that occur for a user?" Also review
Note 245974.1, section "10. How To Generate and Retrieve Trace Files in SSA (Self Service Applications)". Section 10 discusses techniques available within Self Service for debugging and tracing.

9. Are there any other tools that can assist in reviewing trace files (what is TraceAnalyzer)?
... a. Using TKPROF
A trace file can be reviewed using TKPROF.


TKPROF reformats the raw data so that it is easier to review.
The TKPROF commands are normally run at the operating system command prompt.
This will be signified with a $ as this is a common prompt in UNIX.
1. Retrieve the trace file.
2. Issue a command like the following to create a TKPROF version of the trace file.
The explain option will look to see how each query is handled by the database in terms of what tables and indexes are referenced.
$ tkprof sys=no explain=apps/
However, TKPROF does not take into account bind variables. Therefore, these are ignored in the output. When you need to analyze bind variables, consider using TraceAnalyzer.
A handy technique when trouble shooting performance issues is to use TKPROF to look at the longest running queries. Since trace files related to performance can be huge, one might spend hours looking through the results to find the queries causing the issue. If you sort the file by the longest running queries first, it makes it much easier to investigate. The following example sorts by longest running queries first with the sort options selected as "sort='(prsela,exeela,fchela)'" and limits the results to the "Top 10" long running queries with the "print=10" command:


$ tkprof sys=no explain=apps/ sort='(prsela,exeela,fchela)' print=10

... b. Using TraceAnalyzer
Please refer to
Note 224270.1: Trace Analyzer TraceAnalyzer reformats the raw data so that it is easier to review. It is a more powerful tool than TKPROF. It translates things like bind variables and make them easy to find. 1. Download TraceAnalyzer from Note 224270.12. Install trace analyzer in SQL:
SQL> start TRCACREA.sql
3. Retrieve the trace file. 4. In SQL*Plus, issue a command like the following to create a TraceAnalyzer version of the trace file:
SQL> start TRCANLZR.sql UDUMP vis015_ora_22854.trc

10. Will these techniques work in previous versions before 11i (For example, 10.7 and 11.0.3)?
Many of the same techniques will work in previous versions of the Oracle Applications. However, there are some limitations for example, in 10.7 and 11.0.3, the application did not indicate the trace file name when a user enabled trace using Help > Diagnostics > Trace. Also, the previous versions of the application did not allow for the user to enable trace with binds using the Help > Diagnostics navigation path.


11. Another technique for finding / supplying trace files?Check out Note 161474.1 where the RDA output can grab the last trace file and you could then upload the RDA to the Service Request.

Cheers!!!!

Shared APPL_TOP (Read-Only) R12 Stuff

Primary Node:
Host name: genius.chainsys.com
IP : 192.168.2.236
File locations:
apps - /oracle/D1/apps (SHARED)
db - /oracle/PROD/db
inst - /oracle/PROD/inst

Secondary Node:
Host Name: prodn.chainsys.com
IP : 192.168.2.208
File Locations:
apps - /oracle/D1/apps (Mounted from genius)
inst - /oracle/PROD

Sharing File System with NFS :

Here as we installed the apps (Application File System) in /oracle/D1 mount point, it should be shared across all the nodes. The same can be achieved through NFS (Network File System)

The followings are the steps:

1. In primary system i.e genius, login as root add an entry of the folder which is being shared in the /etc/exports file as shown below
/oracle/D1 192.168.2.208(rw,sync)

Note: /oracle/D1 is the folder to be shared from the local machine and 192.168.2.208 is the another node to which the folder should be exported. The 'rw' indicates that the folder is being shared with read write permission and 'sync' indicates that target should be synchronized with source always.

2. Once the entry is made, restart the NFS services in the primary node to bring the changes to effect.
as root - /sbin/service nfs restart

3. In the 'prodn' host machine create the mount point same as the 'genius' node. i.e /oracle/D1
4. As a root mount the folder to the local folder – mount 192.168.2.236:/oracle/D1 /oracle/D1
5. To keep the folder to be mounted even after the secondary node restarts, add a entry in /etc/fstab of secondary node.
192.168.2.236:/oracle/D1 /oracle/D1 nfs rw 0 0



Installing a Shared Application Tier File System with Release 12 Rapid Install

Rapid Install configures multi-node systems to use a shared application tier file system as the default. Before you run Rapid Install, you must do the following:

1. Allocate the shared file system for the installation – This we have already done in the above steps
2. User ID and name should be same in both Primary and Secondary nodes to avoid the permission problems.
3. The shared file system must be mounted on all the application nodes, so that the file system layout is same across all the nodes.
4. Normal pre-requisites required for the installation of the R12 Application should be done.Now start the Rapid Install and follow the below slides for reference.


Read-Only Node Implementation for Shared Application Tier Node File System

The read-only file system node can be configured to perform any of the standard application tier services, such as Forms, Web and Concurrent Processing (Batch). Admin capability should not be configured on this node. The file system associated with APPL_TOP, COMMON_TOP, Tools Oracle Home and Web Oracle Home must be mounted as read-only. This will ensure that any process running on this node will not be able to create or update or delete any file in the file system. The file system associated with Instance Home must have read and write permissions.

Primary Node: genius.chainsys.com
APPL_TOP : /oracle/D1/apps/apps_st/appl Read only
COMN_TOP: /oracle/D1/apps/apps_st/comn Read only
OracleAS 10.1.2 Tools Oracle Home: /oracle/D1/apps/tech_st/visora/10.1.2 Read only
OracleAS 10.1.3 Web Oracle Home: /oracle/D1/apps/tech_st/visora/10.1.3 Read only
INST_TOP: /oracle/PROD/apps/PROD_genius Read only

Adding a Node to a Shared Application Tier File System
Prepare existing node

Execute Rapid Clone on the existing node.As the APPLMGR user, log in to the node that is sharing the file system and execute the following commands:

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

Below colored lines are the terminal output.

[oracle@genius ~]cd $ADMIN_SCRIPTS_HOME
[oracle@genius scripts]$ perl adpreclone.pl appsTier

Copyright (c) 2002 Oracle Corporation
Redwood Shores, California, USA

Oracle Applications Rapid Clone

Version 12.0.0

adpreclone Version 120.15.12000000.5

Running:
perl /oracle/D1/apps/apps_st/appl/ad/12.0.0/bin/adclone.pl java=/oracle/D1/apps/tech_st/10.1.3/appsutil/jdk mode=stage stage=/oracle/D1/apps/apps_st/comn/clone component=appsTier method=CUSTOM appctx=/oracle/PROD/inst/apps/PROD_genius/appl/admin/PROD_genius.xml showProgress
APPS Password :

Beginning application tier Stage - Fri Feb 6 12:09:53 2009

/oracle/D1/apps/tech_st/10.1.3/appsutil/jdk/bin/java -Xmx600M -DCONTEXT_VALIDATED=false -Doracle.installer.oui_loc=/oui -classpath /oracle/D1/apps/tech_st/10.1.3/lib/xmlparserv2.jar:/oracle/D1/apps/tech_st/10.1.3/jdbc/lib/ojdbc14.jar:/oracle/D1/apps/apps_st/comn/java/classes:/oracle/D1/apps/tech_st/10.1.3/oui/jlib/OraInstaller.jar:/oracle/D1/apps/tech_st/10.1.3/oui/jlib/ewt3.jar:/oracle/D1/apps/tech_st/10.1.3/oui/jlib/share.jar:/oracle/D1/apps/tech_st/10.1.3/oui/jlib/srvm.jar:/oracle/D1/apps/tech_st/10.1.3/jlib/ojmisc.jar oracle.apps.ad.clone.StageAppsTier -e /oracle/PROD/inst/apps/PROD_genius/appl/admin/PROD_genius.xml -stage /oracle/D1/apps/apps_st/comn/clone -tmp /tmp -method CUSTOM -showProgress

Log file located at /oracle/PROD/inst/apps/PROD_genius/admin/log/StageAppsTier_02061210.log

/ 80% completed

Completed Stage...
Fri Feb 6 12:11:51 2009
[oracle@genius scripts]$

Note: User ID and group ID should be consistent across nodes in a shared file system to avoid file access permission issues. You must retain the same absolute path for the mount points of the shared file system on each node.

Configure the node to be added

Secondary Node: prodn.chainsys.com

We need to copy the context file from the Primary node to the secondary node. Copy to the location where it should be accessible for the applmgr user. Like in this example it is copied to “/oracle/PROD_genius.xml”.

Then run the following commands,
$ cd $COMMON_TOP/clone/bin $ perl adclonectx.pl addnode contextfile=/oracle/PROD_genius.xml

Below are the terminal output for the above commands.

[oracle@prodn bin]$ perl adclonectx.pl addnode \
> contextfile=/oracle/PROD_genius.xml

Copyright (c) 2002 Oracle Corporation
Redwood Shores, California, USA

Oracle Applications Rapid Clone

Version 12.0.0

adclonectx Version 120.18.12000000.5

Running:
/oracle/D1/apps/apps_st/comn/clone/bin/../jre/bin/java -Xmx600M -classpath /oracle/D1/apps/apps_st/comn/clone/bin/../jlib/ojdbc14.jar:/oracle/D1/apps/apps_st/comn/clone/bin/../jlib/xmlparserv2.jar:/oracle/D1/apps/apps_st/comn/clone/bin/../jlib/java oracle.apps.ad.context.CloneContext -e /oracle/PROD_genius.xml -addnode
Enter the APPS password : apps

Log file located at /oracle/D1/apps/apps_st/comn/clone/bin/CloneContext_02181651.log

Provide the values required for creation of the new APPL_TOP Context file.

Target System Hostname (virtual or normal) [prodn] :

It is recommended that your inputs are validated by the program.
However you might choose not to validate them under following circumstances:

-If cloning a context on source system for a remote system.
-If cloning a context on a machine where the ports are taken and
you do not want to shutdown the services at this point.
-If cloning a context but the database it needs to connect is not available.

Do you want the inputs to be validated (y/n) [n] ? : y

Target System Root Service [enabled] :

Target System Web Entry Point Services [enabled] :

Target System Web Application Services [enabled] :

Target System Batch Processing Services [enabled] : disabled

Target System Other Services [disabled] :

Do you want to preserve the Display [genius:0.0] (y/n) ? : n

Target System Display [prodn:0.0] :
Database port is 1521

Do you want the the target system to have the same port values as the source system (y/n) [y] ? : y
Complete port information available at /oracle/D1/apps/apps_st/comn/clone/bin/out/PROD_prodn/portpool.lst

UTL_FILE_DIR on database tier consists of the following directories.

1. /usr/tmp
2. /usr/tmp
3. /oracle/PROD/db/tech_st/10.2.0/appsutil/outbound/PROD_genius
4. /usr/tmp
Choose a value which will be set as APPLPTMP value on the target node [1] :

Creating the new APPL_TOP Context file from :
/oracle/D1/apps/apps_st/appl/ad/12.0.0/admin/template/adxmlctx.tmp

The new APPL_TOP context file has been created :
/oracle/PROD/inst/apps/PROD_prodn/appl/admin/PROD_prodn.xml

Log file located at /oracle/D1/apps/apps_st/comn/clone/bin/CloneContext_02181651.log
contextfile=/oracle/PROD/inst/apps/PROD_prodn/appl/admin/PROD_prodn.xml
Check Clone Context logfile /oracle/D1/apps/apps_st/comn/clone/bin/CloneContext_02181651.log for details.

[oracle@prodn bin]$

The above command will create a new context file for the node in the secondary node. The next step is to run the AutoConfig utility which will generate the new Instance Home for this node and update the required tables in the database.

$ perl $AD_TOP/bin/adconfig.pl \contextfile=

Below are the terminal output for the above command.

[oracle@prodn bin]$ perl adconfig.pl \
>contextfile=/oracle/PROD/inst/apps/PROD_prodn/appl/admin/PROD_prodn.xml
Enter the APPS user password:

The log file for this session is located at: /oracle/PROD/inst/apps/PROD_prodn/admin/log/02061558/adconfig.log

AutoConfig is configuring the Applications environment...

AutoConfig will consider the custom templates if present.
Using CONFIG_HOME location : /oracle/PROD/inst/apps/PROD_prodn
Classpath : /oracle/D1/apps/apps_st/comn/java/lib/appsborg2.zip:/oracle/D1/apps/apps_st/comn/java/classes

Using Context file : /oracle/PROD/inst/apps/PROD_prodn/appl/admin/PROD_prodn.xml

Context Value Management will now update the Context file

Updating Context file...COMPLETED

Attempting upload of Context file and templates to database...COMPLETED

Configuring templates from all of the product tops...
Configuring AD_TOP........COMPLETED
Configuring FND_TOP.......COMPLETED
Configuring ICX_TOP.......COMPLETED
Configuring IEO_TOP.......COMPLETED
Configuring BIS_TOP.......COMPLETED
Configuring AMS_TOP.......COMPLETED
Configuring CCT_TOP.......COMPLETED
Configuring WSH_TOP.......COMPLETED
Configuring CLN_TOP.......COMPLETED
Configuring OKE_TOP.......COMPLETED
Configuring OKL_TOP.......COMPLETED
Configuring OKS_TOP.......COMPLETED
Configuring CSF_TOP.......COMPLETED
Configuring IGS_TOP.......COMPLETED
Configuring IBY_TOP.......COMPLETED
Configuring JTF_TOP.......COMPLETED
Configuring MWA_TOP.......COMPLETED
Configuring CN_TOP........COMPLETED
Configuring CSI_TOP.......COMPLETED
Configuring WIP_TOP.......COMPLETED
Configuring CSE_TOP.......COMPLETED
Configuring EAM_TOP.......COMPLETED
Configuring FTE_TOP.......COMPLETED
Configuring ONT_TOP.......COMPLETED
Configuring AR_TOP........COMPLETED
Configuring AHL_TOP.......COMPLETED
Configuring OZF_TOP.......COMPLETED
Configuring IES_TOP.......COMPLETED
Configuring CSD_TOP.......COMPLETED
Configuring IGC_TOP.......COMPLETED

AutoConfig completed successfully.
[oracle@prodn bin]$




With this secondary node is created and we can access that through the URL –
http://prodn.chainsys.com:8000/
And if you try to access the primary node URL –
http://genius.chainsys.com:8000/ that will inturn revert you to the http://prodn.chainsys:8000/ itself.


If you run autoconfig on the genius.chainsys.com again, this will make the latest autoconfig run machine as the primary. This is normal behavior of Oracle Applications. Let us discuss, the profile options for the users to use the seconday server's forms and reports, soon........... If you need the profile options, then just ping me on the comments area..
CHEERS!!!!

Shared APPL_TOP (Read only) in R12

Primary Node:
Host name: genius.chainsys.com
IP : 192.168.2.236
File locations:
apps - /oracle/D1/apps (SHARED)
db - /oracle/PROD/db
inst - /oracle/PROD/inst

Secondary Node:
Host Name: prodn.chainsys.com
IP : 192.168.2.208
File Locations:
apps - /oracle/D1/apps (Mounted from genius)
inst - /oracle/PROD

Sharing File System with NFS :

Here as we installed the apps (Application File System) in /oracle/D1 mount point, it should be shared across all the nodes. The same can be achieved through NFS (Network File System)

The followings are the steps:

1. In primary system i.e genius, login as root add an entry of the folder which is being shared in the /etc/exports file as shown below
/oracle/D1 192.168.2.208(rw,sync)

Note: /oracle/D1 is the folder to be shared from the local machine and 192.168.2.208 is the another node to which the folder should be exported. The 'rw' indicates that the folder is being shared with read write permission and 'sync' indicates that target should be synchronized with source always.

2. Once the entry is made, restart the NFS services in the primary node to bring the changes to effect.
as root - /sbin/service nfs restart

3. In the 'prodn' host machine create the mount point same as the 'genius' node. i.e /oracle/D1
4. As a root mount the folder to the local folder – mount 192.168.2.236:/oracle/D1 /oracle/D1
5. To keep the folder to be mounted even after the secondary node restarts, add a entry in /etc/fstab of secondary node.
192.168.2.236:/oracle/D1 /oracle/D1 nfs rw 0 0



Installing a Shared Application Tier File System with Release 12 Rapid Install

Rapid Install configures multi-node systems to use a shared application tier file system as the default. Before you run Rapid Install, you must do the following:

1. Allocate the shared file system for the installation – This we have already done in the above steps
2. User ID and name should be same in both Primary and Secondary nodes to avoid the permission problems.
3. The shared file system must be mounted on all the application nodes, so that the file system layout is same across all the nodes.
4. Normal pre-requisites required for the installation of the R12 Application should be done.
5. Now start the Rapid Install and follow the below slides for reference.


Wednesday, April 08, 2009

Applied Patches Query

PROMPT Shows ALL application patch levels ...
break on application_us
col patch_level for A20;
col application_us for A55;
col application_hr for A55;
select distinct patch_level,
(select application_name from apps.fnd_application_tl tl where tl.application_id=fpi.application_id and language='US') application_us,
(select application_name from apps.fnd_application_tl tl where tl.application_id=fpi.application_id and language='HR') application_hr
from apps.fnd_product_installations fpi
order by 2,1
;
or:
accept PatchName char prompt 'Input Patch number to check (% for all) : ';
col patch_name for A20;
col application_short_name for A20;
select distinct aprb.application_short_name as "Affected Modules", aap.patch_name
from apps.ad_applied_patches aap,
apps.ad_patch_drivers apd,
apps.ad_patch_runs apr,
apps.ad_patch_run_bugs aprb
where
aap.applied_patch_id = apd.applied_patch_id
and apd.patch_driver_id = apr.patch_driver_id
and apr.patch_run_id = aprb.patch_run_id
and aprb.applied_flag = 'Y'
and aap.patch_name like '&PatchName%'
;
or:
accept PatchName char prompt 'Input Patch number to check (Enter for all): ';
col patch_name for A20;
col node_name for A20;
col end_date_ for A20;
break on patch_name on node_name;
select aap.patch_name, aat.name node_name, to_char(apr.end_date,'DD.MM.YYYY HH24:MI:SS') end_date
from ad_applied_patches aap,
ad_patch_drivers apd,
ad_patch_runs apr,
ad_appl_tops aat
where aap.applied_patch_id = apd.applied_patch_id
and apd.patch_driver_id = apr.patch_driver_id
and aat.appl_top_id = apr.appl_top_id
and aap.patch_name like '&PatchName%'
;
To Find out the India Localization Patch details

Use
select * from jai_applied_patches.

Friday, April 03, 2009

FRM-92101

1.The file "ldflags" in
$ORACLE_HOME/lib32 is missing or pointing to a wrong location,
recreate the symbolic link
$ rm $ORACLE_HOME/lib32/ldflags
create lib32 in apps oracle home (mkdir $ORACLE_HOME/lib32)
after this please do the necessary as follows.

$ ln -s $ORACLE_HOME/lib/ldflags $ORACLE_HOME/lib32/ldflags
go to .
/apps/tech_st/10.1.2/forms/lib/make -f ins_forms.mk install
2.Relink forms executables.
Please follow the next below steps:
2.1. Source the Applications environment file
2.2. Run the following command to relink the forms from 10.1.2 home/lib folder
make -f ins_forms.mk installOr make -if ins_forms.mk install

The Issue should be resolved.
Related Posts Plugin for WordPress, Blogger...

Let us be Friends...

Share |

Popular Posts

Labels

11.5.1. to 11.5.5 Cloning Procedure. 11g 11i 11i and R12 11i Autoconfig 11i Cloning 12.1.1 SSL 2 Node RAC Adconfig.sh errors out adgennls.pl adop Advanced Replication Apache version Apex Apex for Oracle database Apex Installation Apex Installation on Oracle E Business Suite. 11i with Apex Apex on 11i Apex on Oracle 11i Apex402 apexins.sql APPL_TOP Character Application Express Application server Issue APPLSYS password Apps Password Asynchronous Replication Autoconfig Autoconfig Managed Beehive Bit of operating system Block block media corrupt BPEL Central Inventory Character Set Conversion Cloning of 11i Cloning of Oracle Applications Clusterware Concurrent CPU 2011 CPU 2012 April CPU 2012 January. CPU 2012 October CRS custom top Custom Top Creation Database . Database Query Dataguard DBMS_REPAIR Demantra . Domain Name E Business Suite Migration EBS 12.2 EPM exp/imp Oracle Applications Flashback table flows_020200 FND_TOP/resource FNDCPASS FNDCPUCF Forms server upgrade Forms startup FRM-92101 Fusion Middleware Hostname Hot Backup Hot cloning HotBackup Hotbackup Cloning of Oracle Apps hrglobal.drv. NLS Saudi Arabian HRMS hyperion Import and Export Oracle Applications Install Oracle Installation of R12 Installation Steps integration Oracle EBS Issues Database issues Oracle EBS Issues with Upgrade 12.1.1 Java Mission Control Java Upgrade java/sql/SavePoint JInitiator Junk Characters Language Translation Linux Linux Migration listener trace Listner version Local Inventory Login Page Master-Master Replication Memory Tuning Multiple Language NLS Non-Autoconfig Enabled OBIEE 11g Installation OBIEE Issues OIM Opatch version OpenSSL ora-01031 Oracle oracle 11g Oracle Announcement Oracle Application servers Oracle Application services Oracle Applications Oracle Applications 11i oracle applications 12.2 Oracle Applications Cloning Oracle Applications Upgrade Oracle Applications. Oracle Apps cloning Oracle BPEL oracle certifications oracle database Oracle Database RMAN Oracle Database upgradation Oracle DB oracle E Business suite 12.2 Oracle EBS oracle EPM Oracle Forms Logo oracle Fusion Applications Oracle Inventory oracle news Oracle OUI Oracle R12 oracle Sun Solaris Oracle Tuning Oracle Virtual Box Oracle Webgate Oracle WMA configuration orcladmin password for Oracle Applications Pasta Configuration pasta.cfg patch PDF Performance Physical Standby Platform migration Printer Configuration Profile Option R12 RAC Rapid Install Rapidwiz Real Application Clusters 10g Recovery RMAN RMAN Recovery SA Gosi Service Oriented Architecture SOA SQLTXPLAIN SSL Configuration step-by-step upgrade Sun solaris Swap Tablespace Trace Enable Trace file Translation Synchronization Patch transport tablespace tuning Tuning SGA uifont.ali Underscore Universal Content Management updates.oracle.com Upgradation of 12.0.5 to 12.1.1 Upgrade Upgrade 11g Upgrade Apps Upgrade DB Upgrade to 11g UTF8 version of oracle applications versions Web server upgrade weblogic windows workflow version XML Publisher version