By default, the Database Trace tool records the following information in the log file when you trace a database connection:
Parameters used to connect to the database
Time to perform each database operation (in microseconds)
The internal commands executed to retrieve and display table and column information from your database. Examples include:
Preparing and executing SQL statements such as SELECT, INSERT, UPDATE, and DELETE
Getting column descriptions
Fetching table rows
Binding user-supplied values to columns (if your database supports bind variables)
Committing and rolling back database changes
Disconnecting from the database
Shutting down the database interface
You can opt to include the names of DBI commands and the time elapsed from the last database connection to the completion of processing for each log entry. You can exclude binding and timing information as well as the data from all fetch requests.
The Database Trace dialog box lets you select the following items for inclusion in or exclusion from a database trace file:
Bind variables Metadata about the result set columns obtained from the database
Time to implement request Time required to process DBI commands; the interval is measured in thousandths of milliseconds (microseconds)
Cumulative time Cumulative total of timings since the database connection began; the timing measurement is in thousandths of milliseconds
The selections made in the Database Trace dialog box are saved to the registry of the machine from which the database connections are made. Windows registry settings for the database trace utility configuration are stored under the HKEY_CURRENT_USER\Software\Sybase\InfoMaker\12.5\ DBTrace key. Registry strings under this key are: ShowBindings, FetchBuffers, ShowDBINames, Timing, SumTiming, LogFileName, and ShowDialog. Except for the LogFileName string to which you can assign a full file name for the trace output file, all strings can be set to either 0 or 1.
The ShowDialog registry string can be set to prevent display of the Database Trace dialog box when a database connection is made with tracing enabled. This is the only one of the trace registry strings that you cannot change from the Database Trace dialog box. You must set ShowDialog to 0 in the registry to keep the configuration dialog box from displaying.
If you do not have access to the registry, you can use PB.INI to store trace file settings. Add a [DbTrace] section to the INI file with at least one of the following values set, then restart PowerBuilder:
[DbTrace] ShowDBINames=0 FetchBuffers=1 ShowBindings=1 SumTiming=1 Timing=1 ShowDialog=1 LogFileName=dbtrace.log
The keywords are the same as in the registry and have the same meaning. When you connect to the database again, the initial settings are taken from the INI file, and when you modify them, the changes are written to the INI file.
If the file name for LogFileName does not include an absolute path, the log file is written to the following path, where <username> is your login ID: Documents and Settings\<username>\Application Data\PowerBuilder12.5. If there are no DbTrace settings in the INI file, the registry settings are used.
If the database trace utility cannot open the trace output file with write access, an error message lets you know that the specified trace file could not be created or opened. If the trace utility driver cannot be loaded successfully, a message box informs you that the selected Trace DBMS is not supported in your current installation.