Pages

OracleEBSpro is purely for knowledge sharing and learning purpose, with the main focus on Oracle E-Business Suite Product and other related Oracle Technologies.

I'm NOT responsible for any damages in whatever form caused by the usage of the content of this blog.

I share my Oracle knowledge through this blog. All my posts in this blog are based on my experience, reading oracle websites, books, forums and other blogs. I invite people to read and suggest ways to improve this blog.


Monday, April 18, 2016

Enabling Trace in Oracle Apps form


Enabling Trace in Apps



Form Tracing
I have a form where I am entering few values and then saving the form. This will have some insert and updates command in the backend which will get executed when we save the form. SQL tracing is used to track those DML queries to debug the issue.

1) Open the form and Navigate to Menu- Help -> Diagnostic -> Trace

2) Here we have many options available (default is ‘No Trace’). We can enable tracing by selecing on of the options from here. ‘Regular Trace’ gives the least information and ‘Trace with Binds and Waits’ (level 12) gives maximum information. Be careful while enabling SQL trace with wait and binds as this will make the trace file huge.

3) Also we can start the tracing in the middle of forms sessions.

4) When we enable the trace it will give the trace file location (This location will be the location of USER_DUMP_DESTINATION parameter of database)

5) After you save the form you can stop tracing by selecting ‘No Trace’ again from Help -> Diagnostic -> Trace -> No Trace

6) Finally use tkprof command to covert this raw trace file into readable format. TKPROF is explained in separate article

Report Tracing
1) Login to System Administrator responsibility and open concurrent program definition form

2) Check the 'Enable Trace' checkbox and save the program

3) In order to generate Level 12 Trace file, Navigate to Profile > System and find the profile option 'Initialization SQL Statement - Custom' for User who is submitting the process to trace. Click on User column - Edit Field and enter below statement:
begin fnd_ctl.fnd_sess_ctl('','','TRUE','TRUE','LOG','ALTER SESSION SET EVENTS=''''''10046 TRACE NAME CONTEXT FOREVER,LEVEL 12'''''); end;
Save the record.

4. Run the Concurrent program which generates the trace file on server

5. Run the following query that gives the directory where the trace file is stored.
SELECT name, value FROM v$parameter WHERE name = 'user_dump_dest';Go to the directory returned by USER_DUMP_DEST and use below command to find the file
grep -i 'CONC_REQUEST_ID=' *
Ex: grep -i 'CONC_REQUEST_ID=1499133' *

6. Finally use tkprof command to covert this raw trace file into readable format

References:


Monday, April 4, 2016

Oracle R12 – ‘Low-Level Diagnostics Logging is turned on’ – how to turn off

If you get the following message when logging on to the Tax Manager Responsibility;
“Low-level Diagnostic Logging is turned on. This may temporarily reduce performance”
lo-level-diagnostics
Oracle R12 Tax Manager Responsibility FND Diagnostics
Oracle R12 Tax Manager Responsibility FND Diagnostics
But want to turn this off then login as a user with System Administrator responsibility and then navigate to:
Profile > System.
Check the following profile option at the Site, User or Responsibility (make sure that if at site level no one else is using this functionality) level:
FND: Debug Log Enabled = No
Tax Manager Profile Options
System Administrator: FND: Debug Log Enabled







You will need to log off and then back in again for the changes to take place.
References:
http://www.ebizanswers.net/2014/08/oracle-r12-low-level-diagnostics-logging-is-turned-on-how-to-turn-off/

HOW TO ENABLE DIAGNOSTICS ON OAF PAGES

Following Steps will enable to show the debug messages in OAF Pages written using call to pageContext.writeDiagnostics in  Controller Code

1)Enable the Diagnostics by Setting Profile FND:Diagnostics to Yes

2)Once the above profile is set to Yes , you will see Diagnostics on the Screen

3)click on Diagnostics and select "Show Log on Screen" and press Ok
4)Select Statement and press Ok

5)) Once this is done , when you go to any navigation you would be able to see log at   the bottom of the page .
6)Another way is to , add at the end of the URL  below string  and press enter
&aflog_level=STATEMENT&aflog_module=*

6)After that you will see diagnostics at the bottom of screen .
References:
http://apps2fusion.com/at/cp/324-how-to-enable-diagnostics-on-oaf-pages
http://allappsdba.blogspot.ca/2012/04/how-to-debug-self-service-page.html