Trace ID 0 indicates that trace definition wasn't created. Check SP return code for the failure reason.
DECLARE @trace_id int, @RC int
EXEC @RC = sp_trace_create @trace_id OUTPUT, 0, N'C:\temp\test\'
PRINT @trace_id
PRINT @RC
>I'm trying to get SQL Server to do event tracing. when I execute this line in Query Analyzer (I already executed sp_trace_create and got back 0 as the trace ID)
>
>exec sp_trace_setevent 0, 14, 4, 1
>
>I get back
>
>Procedure expects parameter '@on' of type 'bit'.
>
>The help files say that on is the 4th parameter, and that bit constants are to be expressed as 1 or 0 with no quotes. What gives?
--sb--