Showing posts with label errorlogs. Show all posts
Showing posts with label errorlogs. Show all posts

Wednesday, March 7, 2012

Errorlogs

Hello All,
I have a SQL server 2000 with sp 3 running on Windows 2000. In the
enterprise manager, when I go to look at errorlogs, it only displays the
most current errorlog and then log # 6. It is not showing any of the
other errorlog files between the current and the number 6. Also, when I
run the command sp_cycle_errorlog, it is not cycling it. My current
errorlog has grown to 321 MB and I want to cycle it.
Have any ideas.
Thanks,
Raziq.
*** Sent via Developersdex http://www.examnotes.net ***
Don't just participate in USENET...get rewarded for it!I am not sure how to address the missing errorlogs or the sp_cycle_errorlog
problem but if you truly want to recycle the SQL Server errorlog, plan a
time to stop and then restart SQL Server. This should recycle the log.
Rand
This posting is provided "as is" with no warranties and confers no rights.

Errorlog retention

I am trying to change the default number of SQL errorlogs from 6 to 12. Does anyone know how to change that?EM>Management>Error Logs>Right click>Configure|||2 ways:

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

TSQL - ...forgot...looking...|||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.|||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.|||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.|||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>|||Yup, you beat me.