• When you create the trace, don't add ".trc' to the end of the name as sp_trace_create will also add it.

    exec sp_trace_create @traceid = @traceid OUTPUT,

    @options = 0,

    @tracefile = 'C:\Temp\myTraceFile', -- DO NOT ADD .TRC HERE!

    @maxfilesize = 10,

    @stoptime = 0

    SELECT * FROM ::fn_trace_gettable('C:\Temp\myTraceFile.trc', default)

    If you have already added it, just amend the filename from "myTraceFile.trc.trc" to "myTraceFile.trc" or you'll only be able to open it using the Profiler GUI and not using fn_trace_gettable.

    Rgds,

    Krop