SetTraceSQL
Mon 01 January 2018Syntax
SetTraceSQL(options)
Description
Use the SetTraceSQL function to programmatically control the Trace SQL utility, enabling you to control TraceSQL options during the course of program execution.
Note: If youâre using an API with the Session class, use the Trace Setting class properties instead of this function.
When you interact with PeopleTools, SQL statements transparently perform actions such as page construction. The Trace SQL utility creates and updates a file showing the SQL statements generated by PeopleTools.
You can set options prior to starting a PeopleTools session using the Trace tab of PeopleSoft Configuration Manager.
Trace SQL creates and writes data to a trace file that it shares with Trace PeopleCode; Trace SQL and Trace PeopleCode information are both output to the file in the order of execution. The trace file uses a file name and location specified in the Trace page of PeopleSoft Configuration Manager. If no trace file is specified in PeopleSoft Configuration Manager, the file is set by default to DBG1.TMP in your Temp directory. If you specify only a file name, and no directory is specified, the file is written to the directory youâre running Tools from. This file is cleared each time you log on and can be opened in a text editor while you are in a PeopleTools session, so if you want to save it, you must print it or copy it from your text editor.
Parameters
Field or Control |
Definition |
---|---|
options |
Either a Number value or a constant that sets trace options. Calculate options by either totaling the numbers associated with any of the following options, or adding constants together: |
Numeric Value |
Constant Value |
Description |
---|---|---|
0 |
%TraceSQL_None |
No output |
1 |
%TraceSQL_Statements |
SQL statements |
2 |
%TraceSQL_Variables |
SQL statement variables (binds) |
4 |
%TraceSQL_Connect |
SQL connect, disconnect, commit and rollback |
8 |
%TraceSQL_Fetch |
Row Fetch (indicates that it occurred and the return code - not the data fetched.) |
16 |
%TraceSQL_MostOthers |
All other API calls except Set Select Buffers |
32 |
%TraceSQL_SSB |
Set Select Buffers(identifies the attributes of the columns to be selected) |
64 |
%TraceSQL_DBSpecific |
Database API-specific calls |
128 |
%TraceSQL_Cobol |
COBOL Statement Timings |
1024 |
%TraceSQL_DB2400Server |
Manager information for DB2/400 only |
4096 |
%TraceSQL_ManagerInfo |
All manager information. |
8192 |
%TraceSQL_AppEngineInfo |
Trace Application Engine information. |
Note: PeopleSoft recommends setting options to 3 to provide most essential information without performance degradation. Options 8 and 32 greatly increase the volume of the trace and will noticeably degrade performance.
Returns
None.