SQL Profiler

  • I might be missing on something obvious but here's the issue I'm having.  I want to create a server-side trace definition.  I do have SA rights in SQL Server and the necessary permissions on the folder where I want to create the trace file.  I run this little piece of code in query analyzer:

    DECLARE @rc int, @Trace_ID int

    EXEC @rc = sp_trace_create @TraceID output, 0, N'C:\test'

    SELECT RC = @rc, TraceID = @TraceID

    And I get a 12 for the return code and 0 for the TraceID.  A return code of 12 means that the file couldn't get created.  I've checked permissions on the file settings and still no luck.  Any clues?

  • Check whether there is a file test.trc under the c: drive in your server. If the file exists, sql server will fail to create the trace.

     

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply