locked
New Log Event in MS SQL Server 2012 RRS feed

  • Question

  • Hi 

    Can anyone tell me is there any new logging event is added in SQL Server 2012 log format. I mean to say that SQL server log its application log in "C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\Log\" this location. so far i know it supports following 7 events

    1. Login Succeeded

    2. Login Failed

    3. SQL Trace stopped

    4. SQL Trace started

    5. Database Start

    6. SQL Server Stoping

    7. SQL Server Starting/Started

    Is there any new event is added into it. Please give me info of this


    Bidyut Kumar Mondal "Hope for Best, Plan for Worst"

    Thursday, November 8, 2012 12:59 PM

Answers

  • Are we talking about the default trace or the errorlog file? To find out what messages are logged to the errorlog file, you can use below query:

    SELECT *
    FROM sys.messages 
    WHERE is_event_logged = 1
    AND language_id = 1033

    Above query returns 775 rows on 2012 and 705 on 2008R2, so there are apparently 70 new messages whcih by default are logged to the errorlog file.

    Tibor Karaszi, SQL Server MVP | web | blog

    Thursday, November 8, 2012 5:06 PM
  • Nice query Tibor - thanks. Adding a filter on message_id will cull out any potential user/application custom messages :)

    SELECT *
    FROM sys.messages 
    WHERE is_event_logged = 1
    AND language_id = 1033
    and message_id < 50000


    Regards, Matt Bowler MCITP, My blog | SQL Services

    Thursday, November 8, 2012 8:07 PM

All replies

  • Are we talking about the default trace or the errorlog file? To find out what messages are logged to the errorlog file, you can use below query:

    SELECT *
    FROM sys.messages 
    WHERE is_event_logged = 1
    AND language_id = 1033

    Above query returns 775 rows on 2012 and 705 on 2008R2, so there are apparently 70 new messages whcih by default are logged to the errorlog file.

    Tibor Karaszi, SQL Server MVP | web | blog

    Thursday, November 8, 2012 5:06 PM
  • Nice query Tibor - thanks. Adding a filter on message_id will cull out any potential user/application custom messages :)

    SELECT *
    FROM sys.messages 
    WHERE is_event_logged = 1
    AND language_id = 1033
    and message_id < 50000


    Regards, Matt Bowler MCITP, My blog | SQL Services

    Thursday, November 8, 2012 8:07 PM