The DSI Database Trace tool is a managed database interface that records the internal commands PowerBuilder executes while accessing a database.
Use the DSI Database Trace tool in PowerBuilder .NET WPF applications to trace DSI database connections at runtime. Unless you use the PBADO driver, the DSI data source interface calls the DBI database interface to connect to a database. This, in turn, activates the DBI Database Trace tool to trace the DBI database connections, although you can disable DBI tracing through a DSI parameter setting.
SQLCA.DBMS = "TRA ODBC"
The DSI Database Trace tool writes the output of the DSI trace to a log file that you specify in a DSI parameter setting. When you initially enable DSI or DBI database tracing, PowerBuilder creates the log file on your computer. Tracing continues until you disconnect from the database.
At design time, you can use only DBI tracing. See the PowerBuilder Classic Users Guide.
Set the DSI Database Trace tool parameters in a DSITrace section of the configuration file for your application. The DSITrace section must also include a type parameter set to "Sybase.PowerBuilder.DataSource.DSITraceConfig, Sybase.PowerBuilder.DataSource,Version=12.0.0.0, Culture=neutral, PublicKeyToken=598c7456a83d557a".
This table describes parameters you can set for DSI tracing in a DSITrace element after the configSections tag in the application configuration file.
Parameter | Description |
---|---|
fileName |
Name and location of the trace log file. If you do not specify a full path name, the log file is saved in the current directory. If you do not use this parameter, the DSI trace file is not generated. |
disableDBITrace (optional) |
Set or cancel DBI tracing when DSI tracing is enabled. This parameter is not valid for PBADO drivers. Values are:
|
showParameters (optional) |
Include or exclude SQL command parameters in the DSI trace log file. Values are:
|
showFetchData (optional) |
Include or exclude data from fetch buffers in the DSI trace log file. Values are:
|
<?xml version="1.0" encoding="utf-8" ?> <configuration> <configSections> <section name="DSITrace" type="Sybase.PowerBuilder. DataSource.DSITraceConfig, Sybase. PowerBuilder.DataSource,Version=12.0.0.0, Culture=neutral, PublicKeyToken=598c7456a83d557a" /> </configSections> ... <DSITrace fileName="c:\dsitrace.log" disableDBITrace="1" showParameters="1" showFetchData="1" /> ... </configuration>
The log file that you generate with the DSI Database Trace tool lists information from commands of three object types: DSConnection, DSCommand, and DSReader. The log file also lists SQL commands and data from fetch buffers if you enabled those options in the configuration file.
(tID.objID) DSObject.commandIssued() MM/DD/YYYY HR:MIN:SEC / #### MS