Trace file failed to create table

  • SELECT TextData, Duration Duration, Reads, Writes, CPU, StartTime,EndTime into Trace_20140522190546

    FROM fn_trace_gettable('E:\Trace\Trace_20140522190546.trc',1)

    GO

    Msg 568, Level 16, State 18, Line 1

    Encountered an error or an unexpected end of trace file 'E:\Trace\Trace_20140522190546.trc'.

    The statement has been terminated.

    why and how to resolve

  • Look s like the trace file is corrupted.

    DId you try to open it with profiler?

    -- Gianluca Sartori

  • I am using express edition so there is no profiler to load the trace file 🙁

  • The trace is still running. Stop it first, then load the data.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • I switched on the trace of 10 hour since the hits are going to small in the database.After 98 MB it automatically stopped i dont know why?

    It has passed 10 hours after that only i am reading the trace.

  • Check in SQL that the trace is not running. That is exactly the error you get if you try reading a trace file that is still being written to.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • actually beyond 98 mb the trace stopped.

    i mark the trace for 10 hour , it ran only for 7 hours which reached 98 mb after that there is no entry i dont know why it stopped

    I followed ur link only Gail

    https://www.simple-talk.com/sql/performance/finding-the-causes-of-poor-performance-in-sql-server-part-1/

    instead of

    SET @EndTime = DATEADD(mi,30,getdate())

    as

    SET @EndTime = DATEADD(mi,600,getdate())

  • yuvipoy (5/23/2014)


    actually beyond 98 mb the trace stopped.

    i mark the trace for 10 hour , it ran only for 7 hours which reached 98 mb after that there is no entry i dont know why it stopped

    I followed ur link only Gail

    https://www.simple-talk.com/sql/performance/finding-the-causes-of-poor-performance-in-sql-server,-part-1/

    instead of

    SET @EndTime = DATEADD(mi,30,getdate())

    as

    SET @EndTime = DATEADD(mi,600,getdate())

    The trace may have stopped but you still need to close it in order for it to release your trace file.

  • Lynn Pettis (5/23/2014)

    The trace may have stopped but you still need to close it in order for it to release your trace file.

    Atcually i restarted my pc and also moved the trace file from the place.

  • Lynn Pettis (5/23/2014)

    The trace may have stopped but you still need to close it in order for it to release your trace file.

    How to close the trace in order to release if i have not restarted my PC ?

    Atleast i can use this for upcoming traces

  • yuvipoy (5/26/2014)


    Lynn Pettis (5/23/2014)

    The trace may have stopped but you still need to close it in order for it to release your trace file.

    How to close the trace in order to release if i have not restarted my PC ?

    Atleast i can use this for upcoming traces

    Books Online (BOL) is your friend. You may want to learn how to use it.

    IIRC, F1 on your keyboard while in SSMS will bring it up.

Viewing 11 posts - 1 through 10 (of 10 total)

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