TL;DR Try registering the other .dll/mof pairs instead of the one recommended by your guide.
The steps to manually register the DLL (modified from this MS guide)
- Add the following registry key
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\BidInterface\Loader
- Create a new string value (note the ':' in the key) and Modify... it
Value Name = ":Path"
Value Data = "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\AdoNetDiag.dll"
- Register ETW Providers in your WMI repository with mofcomp.exe (installed with windows)
mofcomp.exe C:\Windows\Microsoft.NET\Framework64\v4.0.30319\adonetdiag.mof
To test:
logman start test -p "System.Data.1" -o test.etl -ets // Start a trace
// Do things with ADO.NET (run your sample)
logman stop test -ets // Stop a started trace
tracerpt.exe test.etl -of CSV -o dump.csv // make it human readable
If things worked, you should now have a summary.txt and dump.csv file in the same directory filled with tracing information. Good luck.
Which ADONETDIAG.dll
did you register with those steps? I followed these (they appear to be the ones Microsoft published that everyone else uses for their guides) and found them to work with one gotcha.
The one gotcha I discovered is that there can be multiple copies of ADONETDIAG.dll
installed on your machine - and the DLL you register matters! For example, my machine has one installed in the following locations
- C:\Windows\Microsoft.NET\Framework64\v2.0.50727\AdoNetDiag.dll
- C:\Windows\Microsoft.NET\Framework64\v4.0.30319\AdoNetDiag.dll
- C:\Windows\Microsoft.NET\Framework\v2.0.50727\AdoNetDiag.dll
- C:\Windows\Microsoft.NET\Framework\v4.0.30319\AdoNetDiag.dll
All of the steps I've found direct you to register \Framework\v2.0.50727\AdoNetDiag.dll
. When I tried this I was not getting any logs (my .etl files capture 1 event, the trace start, and never grow beyond 8KB).
Trial and error led to discovering \Framework64\v4.0.30319\AdoNetDiag.dll
working for me.