Tracing IBM Data Server Provider for .NET
You can trace the activity of the IBM Data Server Provider for .NET by setting environment variables or by using an application configuration file.
About this task
You generate the .NET application trace by using the System.Diagnostics.Trace class. You can control the tracing of the .NET public methods and properties by using the System.Diagnostics.TraceSwitch class without recompiling or modifying the source code. Only the method and property calls that are explicitly made by the applications are traced. Internal method and property calls that are made by a .NET provider are not traced.
The DB2NMPTRACE trace switch property and the DB2NMPTRACE environment variable initializes the System.Diagnostics.TraceSwitch class for the Db2® .NET provider.
-
0
- Turns off the tracing. 1
- Turns on the tracing for errors. 2
- Turns on the tracing for errors and warnings. 3
- Turns on the tracing for errors, warnings, and informational messages. 4
- Turns on the tracing for all messages.
Procedure
To trace IBM Data Server Provider for .NET:
Results
* * Started tracing program
* Creating connection
DB2Connection.DB2Connection1 api entry - database=nmpfvtu;
DB2Connection.DB2Connection1 api exit, rc = 0
* Opening connection
DB2Connection.Open api entry
DB2Connection.Open api exit, rc = 0
* Closing connection
DB2Connection.Close api entry
DB2Connection.Close api exit, rc = 0
* Ending program
DB2Connection.~DB2Connection api entry
DB2Connection.~DB2Connection api exit, rc = 0
DB2Connection.Dispose api entry
DB2Connection.Dispose api exit, rc = 0
The trace points
that are dumped by the application are prefixed with an asterisk (*).