Sunday, February 12, 2012

Command Line - Replay of SQL Trace? SQL 2005

Hello,

I have to replay a SQL trace over and over again. I can do this with the profiler GUI however I see no way of doing this with a command line utility.

1) Is there a utility that will allow me to replay a trace via command line?

2) Is there a way to tell profiler to automatically run the replay I am requesting and then shut down?

3) Are there any .net classes I might code against to programatically start this replay?

Thanks for your help,

David Sandor

Hi,

what about saving the commands to a file and executing them with SQLCMD and the -o switch ?

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de

|||

Well, the trace(s) I need to replay are quite long (500+ statements). I did however come up with a solution. I wrote a little C# app that reads the XML trace file and executes the statements using the Enterprise Library for the data layer. Very similar to your suggestion.

Thanks,

David Sandor

No comments:

Post a Comment