How to edit trace info FN_TRACE_GETINFO('1')


  • Hello all,

    Do someone know how to edit trace info from query below, for example, I want to edit value of property from 2 to 4 for security reason, thanks so much

    select *  FROM ::FN_TRACE_GETINFO('1')

    traceid property value

    1    1    2
    1    2    C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\Log\log_4.trc
    1    3    20
    1    4    NULL
    1    5    1

    Friday, January 10, 2014 9:54 AM


  • Note that FN_TRACE_GETINFO is deprecated.  I suggest you use sys.traces DMV instead.  It's much easier to interpret.

    Is your question how to specify the 'shutdown on error' option for the default trace?  The short answer is that you can't.  However, you can create your own functionally identical trace with that option and then turn off the default trace using sp_configure.  Importantly, you will want to specify option 6 rather than 4.  That is a bitmask that will specify both rollover file and shutdown options.  If you specify only 4, the server will shutdown as soon as the file reaches the specified size limit.

    Dan Guzman, SQL Server MVP,

    Sunday, January 12, 2014 3:35 PM

All replies