Monday, March 12, 2012

How to set SQL Profiler via command line

Hello,

How can I set SQL Profiler to capture the logs via command line?

This is what I have:

I already have a SQL Profiler Template (fooTemplate.tdf) which tells what I need SQL to capture.

C:\>"C:\Program Files\Microsoft SQL Server\90\Tools\Binn\PROFILER90.EXE" /Sfoo /Dfoo /E /T"c:\fooTemplate.tdf" /Oc:\mysql.out

What other parameters am I missing?

Thanks!

J

Trace automation is done with the sp_trace_create and it's assocciated procedures, not through the profiler gui.

Books Online: ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/udb9/html/fd605a61-ade1-49d6-8174-cbe789b6d342.htm

|||How about if the SQL Server I used is 2000, I've checked it b4 but cannot find the Profiler90.exe, only Profiler.exe is exist which don't hv output file path I can specified. Pls help. Thanks.|||

Please read the following to find out how to monitor SQL Server using Profiler Traces.

http://yukonspace.blogspot.com/2007/09/server-side-profiler-traces.html

The EXE for SQL Server 2000 Profiler is Profiler.exe and for SQL Server 2005 is Profiler90.exe

No comments:

Post a Comment