SQL ERROR LOG

  • Hi,

    can anyone know where the sql server stores the sql error log configuration settings info.

    we want to monitor the sql error log settings so is it possible to monitor them.

    By default the value is between 6-99 error logs we can have... how can we monitor them and where does it store the config setting information in like(sys table,registry etc)..

    can anyone help me with this...

    Thanks in advance

  • HVPR (11/24/2009)


    can anyone know where the sql server stores the sql error log configuration settings info.

    There is SQL Server error log, not aware of "sql error log configuration settings info"

    Find the article below, would that help your case?

    Working with SQL Server Error Logs

    we want to monitor the sql error log settings so is it possible to monitor them.

    By default the value is between 6-99 error logs we can have... how can we monitor them and where does it store the config setting information in like(sys table,registry etc)..

    Would you like to view the error logs or view the settings? Either case, in the object explorer, under Management Node, on SQL Server Logs right click and select Configure or select View to view the Error logs.

    UPDATE: Updated the link to the blog post


    Bru Medishetty

    Blog -- LearnSQLWithBru

    Join on Facebook Page Facebook.comLearnSQLWithBru

    Twitter -- BruMedishetty

  • Hi Bru,

    Thanks for the reply...

    Ya I know where to look at log files but we are implementing some standards at server level.

    so we are looking to write a script to monitor the sql error log setting.

    if sql server error log is configured to store 6 or 20 or 30 logs..where does this info store in the system

    (system table,registry etc) it should somewhere store the details right.so that we can write a script to go and get the error logs value on each server.

  • This should solve..

    USE [master]

    GO

    EXEC xp_instance_regread N'HKEY_LOCAL_MACHINE',

    N'Software\Microsoft\MSSQLServer\MSSQLServer', N'NumErrorLogs'

    GO


    Bru Medishetty

    Blog -- LearnSQLWithBru

    Join on Facebook Page Facebook.comLearnSQLWithBru

    Twitter -- BruMedishetty

  • This should solve..

    USE [master]

    GO

    EXEC xp_instance_regread N'HKEY_LOCAL_MACHINE',

    N'Software\Microsoft\MSSQLServer\MSSQLServer', N'NumErrorLogs'

    GO


    Bru Medishetty

    Blog -- LearnSQLWithBru

    Join on Facebook Page Facebook.comLearnSQLWithBru

    Twitter -- BruMedishetty

  • Thanks Bru,

    It was very helpful to me..for getting the default value made a small change.

    declare @NumErrorLogs int

    exec master.dbo.xp_instance_regread N'HKEY_LOCAL_MACHINE', N'Software\Microsoft\MSSQLServer\MSSQLServer', N'NumErrorLogs', @NumErrorLogs OUTPUT

    print @NumErrorLogs

    Thanks.......

  • Better use GUI instead of this query.

  • luckysql.kinda (11/26/2009)


    Better use GUI instead of this query.

    Have you read the Original Post ?

    The OP wanted to monitor through script on all Server. OP has mentioned about seeing in GUI.

    I had already written an article on SQL Server Error Log in my site found in my signature. I know it is can be seen in SSMS (GUI).


    Bru Medishetty

    Blog -- LearnSQLWithBru

    Join on Facebook Page Facebook.comLearnSQLWithBru

    Twitter -- BruMedishetty

  • Right Click SQL Server Agent in SSMS and select Properties.

  • cathy.baker (11/27/2009)


    Right Click SQL Server Agent in SSMS and select Properties.

    For what?


    Bru Medishetty

    Blog -- LearnSQLWithBru

    Join on Facebook Page Facebook.comLearnSQLWithBru

    Twitter -- BruMedishetty

  • You are true Bru!

    -Lk

  • luckysql.kinda (12/2/2009)


    You are true Bru!

    -Lk

    Yep !


    Bru Medishetty

    Blog -- LearnSQLWithBru

    Join on Facebook Page Facebook.comLearnSQLWithBru

    Twitter -- BruMedishetty

  • Right Click Error Logs under SQL Server Agent --- Then Configure.

Viewing 13 posts - 1 through 12 (of 12 total)

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