• Well if the code you posted is the exact code you used then your problem is that you are missing the '@' sign before OutPutFileName in the sp_trace_create call here's your code:

    exec @rc = sp_trace_create @TraceID output, 0, OutputFileName, @maxfilesize, @EndTime

    And here's what it should be:

    exec @rc = sp_trace_create @TraceID output, 0, @OutputFileName, @maxfilesize, @EndTime