posts - 230, comments - 423, trackbacks - 27

My Links



Follow billgraziano on Twitter

Article Categories


Post Categories


SQL Server

Automatically Processing SQL Server Trace Files

Lately I've been working on a small utility to process SQL Server trace files.  If you use scripted traces to generate trace files there's no automated way to get these into a SQL Server table.  I wrote a little .NET utility to do it for me that I'm calling ClearTrace.  You can download it here.  Currently it's a command line utility and VERY beta.  In the future I plan to rewrite it as a service and add better error checking. 

ClearTrace should run on an admin workstation and not on the server.  It watches trace files based on a filter you specify.  It's best to share out the directory where your trace files are stored.  After each trace file is completed and the system rolls over to the next trace file, ClearTrace will process the trace.  It will be moved to a working directory and renamed with a time stamp appended to the file name.  ClearTrace will then load the trace file into a specified table on a specified server.  If the table doesn't exists, ClearTrace will create it for you.  It can handle an unlimited number of traces each going to its own SQL Server and table.  After the trace file is loaded, ClearTrace will move the file to an archive directory.  Each trace can specify its own working and archive directories.  Each trace can also specify how long to retain the archived trace files before they're deleted.

If you find any problems, please let me know.  I'd also be interested in feedback on whether this is a usefull application or not.  At this point the source code isn't available but I may make it available in the future.

Print | posted on Sunday, April 11, 2004 7:31 PM | Filed Under [ SQL Server Stuff ]



# Take Outs for 12 April 2004

Take Outs for 12 April 2004
4/12/2004 10:11 PM | Enjoy Every Sandwich

# re: Automatically Processing SQL Server Trace Files

Your ideea it's nice because i am investigating the possibility to watch the trace "easy delayed" and to merge it with events from my app
I could configure the trace to make small trace file chunks that i load into another db for analysis...
But why were the sql profiler ole automation interfaces removed from sql server 2000?
11/3/2004 10:52 AM | Liviu

# re: Automatically Processing SQL Server Trace Files

Great utility.
8/16/2005 2:10 PM | Luis Velasco
Comments have been closed on this topic.

Powered by:
Powered By Subtext Powered By ASP.NET