Академический Документы
Профессиональный Документы
Культура Документы
Oracle Applications 11i provides a profile option that allows to execute custom code at the beginning of every database session. These sessions can be linked to an online Form, a Concurrent Program, or any other piece of code that requires accessing the database. The most common use of this profile option is to generate detailed raw SQL Trace files including the values of the bind variables used by SQL statements. This profile is also used to report on raw SQL Trace, all database waits, used to determine gaps between elapsed and CPU times. Values of bind variables are necessary when a bad performing SQL is found on TKPROF, and the Explain Plan shows only zeros on its Rows column. The display of the number of rows in the explain plan from TKPROF, is needed in order to narrow the area in which the SQL statement is retrieving a large volume of data. For both, values of bind variables and database waits, an RDBMS Event is used (Event 10046). This document describes how to set the profile option Initialization SQL Statement Custom for one USER, in order to generate detailed raw SQL Traces to troubleshoot Apps Performance issues. Use this profile wisely. 1. Verify that profile option Initialization SQL Statement Custom is accessible to users and programs. Login with a USER that has access to the Application Developer Responsibility. Navigate to Profiles Form (choose Profile option on menu for Application Developer responsibility). Query profile FND_INIT_SQL. User and Program Access check boxes should be checked, as well as System Administrator Access Visible and Updateable, at the User level as shown on screen shot below.
Page 1 of 3
3. Using System Administrator Responsibility, navigate to System Profile Values Form (Profile System from Navigator). Query profile option Initialization SQL Statement Custom for user TRACE and update the value with string below:
BEGIN FND_CTL.FND_SESS_CTL ('','','TRUE','TRUE','LOG', 'ALTER SESSION SET EVENTS=''10046 TRACE NAME CONTEXT FOREVER, LEVEL 12'''); END;
Page 2 of 3
Page 3 of 3