ORACLE

ORACLE
Let us share our knowledge to the world of oracle apps. I am trying my best to do so and I request every one to contribute their part. If you have any thing useful related to oracle apps, do send me I will post in my blog on behalf of you. If you like my blog tell the world about it, else tell me i will improve. You can suggest me, what exactly you want on oracle apps. Mail your queries.

Wednesday, June 6, 2012

Enable trace file for a concurrent program

Character mode report


Log on to oracle application
      1.    Go to System Administrator -> Concurrent -> Program -> Define.
      2.    Query the concurrent program for which you want to enable the trace.
      3.    Enable the check box “Enable Trace” and save it.
      4.    Now from the appropriate responsibility, run the concurrent program.
      5.    A SQL Trace will be Saved in the ../udump directory of the database server
Check out the following blog post for extracting the trace file from the database server


Extract trace file in oracle apps
How to extract the trace file of a concurrent program?


Following steps need to be performed:


1. Setup the profile value at user level with the following value


Profile name: "Initialization SQL Statement - Custom"
User: abc
Profile value:
BEGIN FND_CTL.FND_SESS_CTL('','','TRUE','TRUE','','ALTER SESSION SET TRACEFILE_IDENTIFIER = abc MAX_DUMP_FILE_SIZE = 5000000 EVENTS ='||''''||' 10046 TRACE NAME CONTEXT FOREVER, LEVEL 12'||'''');END;


2. Now on ward all the trace will be tracked in the .trc file. Find out where the trace file resides in the DB.


Go to Help -> Diagnosics -> Trace. enable trace. After doing so, a pop up will show the server path where the trace will get create..


usually .trc file will get created in DB server. The file path may be say "/u01/app/oracle/admin/RAC11D/udump/RAC11D_ora_17181_abc.trc". the path will be stored along with the trc file name. usually the value in the profile value TRACEFILE_IDENTIFIER=AKONDURU is used in the trace file naming


3. Now we have enabled trace for your user login. So what ever you do. say run a concurrent program. how the concurrent program is executed? the sql queries executed. how the control is going... every thing is tracked in the trace file.


4. Log in to the DB server. extract the file and convert to readable format.


Go to the following path in the DB server -> '/u01/app/oracle/admin/RAC11D/udump/'. Identify the file name which is prompted while enabling the trace (look point 2).


the .trc file is not readable. You have to convert it (tkprof) to make it readable. use the following command to do so.


tkprof (input).trc output.txt EXPLAIN=()


where input.trc is the trace file and output.txt is in readable format


5. After you get the trace file. make sure to remove the profile value that you have set for the profile : "Initialization SQL Statement - Custom".. else the system will go on creating a huge trace file.

No comments:

Post a Comment