ADO.NET 2.0 Tracing Quick Start

.NET Framework 2.0 includes a very low level trace facility for ADO.NET.  Below are the basic steps to get tracing up and running.

1) Activate the tracing DLL.  Framework 2.0 ships with AdoNetDiag.dll.  This contains the ADO.NET tracing providers.  To activate it, make the following registry entry (note the : in front of Path):

2) Register the ADO.NET tracing providers with WMI:

3) Setup tracing in the performance monitor:

3a) Create a new tracing log, name it whatever you like:

3b) On the general tab, select Nonsystem providers and add the following:

3c) On the Log Files tab, use the Configure button to change the log file location:

4) Start tracing by pressing the run button:

5) Run your ADO.NET code.

6) Stop the trace by pressing the stop button (to the right of the run button).

7) Convert the trace file to a CSV text file:

8) open the CSV file with Excel (or Notepad):

For more detail, see http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnadonet/html/tracingdataaccess.asp.

Print | posted @ Monday, May 22, 2006 9:02 AM

Comments on this entry:

Gravatar # re: ADO.NET 2.0 Tracing Quick Start
by Mark Kitz at 8/14/2006 12:05 PM

Thanks for your post. Question... Do you know why the NonSystem providers (in step 3a for System.Data.1 etc.) do not show up, but do show up when I use the cmd "logman query providers".
Gravatar # re: ADO.NET 2.0 Tracing Quick Start
by David Douglass at 8/15/2006 3:11 AM

The missing non system providers sounds like a WMI problem. Is the "Windows Management Instrumentation" service running?
Post A Comment
Title:
Name:
Email:
Website:
Comment:
Verification: