Results 1 to 8 of 8
  1. #1
    Join Date
    Apr 2004
    Posts
    4

    Unanswered: Errorlog retention

    I am trying to change the default number of SQL errorlogs from 6 to 12. Does anyone know how to change that?

  2. #2
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    EM>Management>Error Logs>Right click>Configure
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  3. #3
    Join Date
    Jul 2003
    Location
    San Antonio, TX
    Posts
    3,662
    2 ways:

    GUI - right-mouse click on SQL Server Logs under Management and select Configure

    TSQL - ...forgot...looking...
    "The data in a record depends on the Key to the record, the Whole Key, and
    nothing but the Key, so help me Codd."

  4. #4
    Join Date
    Apr 2004
    Posts
    4
    Thanks. looks like it issues this behind the scenes: xp_instance_regwrite N'HKEY_LOCAL_MACHINE', N'SOFTWARE\Microsoft\MSSQLServer\MSSQLServer', N'NumErrorlogs', REG_DWORD, 12

    That will be helpful so I don't have to click 500 times for 100 servers.

  5. #5
    Join Date
    Apr 2004
    Posts
    4
    Thanks. looks like it issues this behind the scenes: xp_instance_regwrite N'HKEY_LOCAL_MACHINE', N'SOFTWARE\Microsoft\MSSQLServer\MSSQLServer', N'NumErrorlogs', REG_DWORD, 12

    That will be helpful so I don't have to click 500 times for 100 servers.

  6. #6
    Join Date
    Apr 2004
    Posts
    4
    Thanks. looks like it issues this behind the scenes: xp_instance_regwrite N'HKEY_LOCAL_MACHINE', N'SOFTWARE\Microsoft\MSSQLServer\MSSQLServer', N'NumErrorlogs', REG_DWORD, 12

    That will be helpful so I don't have to click 500 times for 100 servers.

  7. #7
    Join Date
    Jul 2003
    Location
    San Antonio, TX
    Posts
    3,662
    Almost forgot about this post! Here's a TSQL way of doing it (requires permissions, but I guess you're the admin, so go get it ):

    xp_instance_regwrite N'HKEY_LOCAL_MACHINE', N'SOFTWARE\Microsoft\MSSQLServer\MSSQLServer', N'NumErrorlogs', REG_DWORD, <put_your_number_here>
    "The data in a record depends on the Key to the record, the Whole Key, and
    nothing but the Key, so help me Codd."

  8. #8
    Join Date
    Jul 2003
    Location
    San Antonio, TX
    Posts
    3,662
    Yup, you beat me.
    "The data in a record depends on the Key to the record, the Whole Key, and
    nothing but the Key, so help me Codd."

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •