Trace logging provides a detailed record of system and application events when activities such as a disk I/O operation or a committed transaction occur. Tracing of data access activities is vastly improved in ADO.NET 2.0 with the ADO.NET Event Tracing for Windows (ETW) provider. ETW is a tracing mechanism that you can use in drivers as well as applications. ETW can log about 20,000 entries per second with only 5 percent CPU load, even while logging from multiple processes concurrently. ETW can easily be turned on and off at runtime. The ETW output can be consumed by third-party tools, including the logparser.exe utility that is included in the Microsoft Internet Information Service (IIS) 6.0 Resource Kit.
This chapter starts by explaining the procedure to set up tracing; it then covers the LogMan.exe command-line utility, which comes with the operating system and is part of the Performance Logs And Alerts services. We also explore the Performance Logs And Alerts snap-in, which provides a graphical means for creating and controlling traces. Finally, we look at how to use tracing to diagnose problems.