Hi
The trace_id is returned as an output variable from sp_trace_create or from
running
Select * from ::fn_trace_getinfo(default)
There are examples of using these procedures in Kalen's Inside SQL Server
2000 ISBN 0-7356-0998-5
John
[quoted text, click to view] "Victor Feng" wrote:
> To use sp_trace_setevent [ @traceid = ] trace_id, where can I get the trace_id?
>
> Thanks
> Victor
Hello Victor
You may find it helpful (for learning purposes) to first create the trace
in Profiler and then script it out. This creates an almost functional SQL
script that you can open in SQL Query Analyzer. Just change the target
filename and you should be good to run the script and see how it works.
Thank you for using Microsoft newsgroups.
Sincerely
Pankaj Agarwal
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.