DAAB tracing

Topics: Data Access Application Block
Feb 25, 2007 at 4:41 PM
Hi, I would like to trace sql queries in daab. is it possible?
Feb 25, 2007 at 7:20 PM
There is some instrumentation built into the DAAB that has various performance counters as well as information about specific failed commands and connections, etc.

The DAAB does not do any tracing of SQL Queries, however, that you might get from the SQL Profiler, which allows you to review / trace queries to the database.

You could add some tracing to your Data Access Layer, however, in a couple of ways. One, you could modify the Abstract Database Class that comes with the DAAB to publish events about queries being executed by the DAAB. Two, in your Data Access Objects / Repository Classes that use the DAAB you could fire off the events from there saving you the effort of modifying the DAAB.

Adding such events to the DAAB would certainly be useful, but one would have to contend with the performance impact it may have on offering such services.




David Hayden
Microsoft MVP C#
Feb 25, 2007 at 7:56 PM