Blackbox Trace File Growing Uncontrolled

  • In my 7.0 database the blackbox.trc file grows uncontrolled.

    It is my understanding that the original .trc file should be limited to 5mb and then start a second .trc version up to 5mb, and then begin overwriting the original. I should then see two files, never more than 5mb each.

    What I have is one file. Today it is at 200,000 kb. I deleted it two days ago at 1.9 million KB!

    Any ideas why the deviation from expected results?

  • Sorry you are confusing that with SQL 2000, in 7 the file grows until destroyed or the server stopped.

    From BOL

    quote:


    The xp_trace_setqueryhistory system stored procedure starts a trace consisting of the last 100 queries, including any server exceptions. Trace data is appended to the file named blackbox.trc either when a server exception occurs or when SQLDIAG (located in \Mssql7\Binn) is executed. When SQLDIAG is executed, the last 100 queries, including any server exceptions, are written to SQLDIAG.trc.


    What is happening is in memory the SQL Server is keeping track of the last 100 statments at any given time. It replaces them based on oldest first until an exception occurrs. At the point an exception occurrs those queries are appended to the blackbox.trc file, not overwriting anything. If you file is growing extremely fast then you have a high number of exceptions occurring and should look into this.

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

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