| Login

Search this Blog


Links I like to keep around




Here are the most recent postings to this blog. Use the archive calendar or search to find other entries.
Apr27

Written by:R Teachout
4/27/2007 2:39 PM

Ever need to Cycle the Error logs for MSSQL without restarting SQL?

use master
execute sp_cycle_errorlog

Every time SQL Server is started, the current error log is renamed to errorlog.1; errorlog.1 becomes errorlog.2, errorlog.2 becomes errorlog.3, and so on. sp_cycle_errorlog enables you to cycle the error log files without stopping and starting the server.

Execute permissions for sp_cycle_errorlog are restricted to members of the sysadmin fixed server role.
MS Link : http://msdn2.microsoft.com/en-us/library/ms182512.aspx

Note:  I did this on MSSQL 2005, but it probably works for SQL2000, etc.... at your own risk!

 

Also found this:

Do you know how to get a count of deadlocks from the current errorlog? Try this:

EXEC sp_readerrorlog 1, 'PATHHERE\mssql\log\errorlog', 'Deadlock'

Tags:

Your name:
Title:
Comment:
Security Code
Enter the code shown above in the box below
Add Comment   Cancel  

In an open world, who needs Windows or Gates
-Unknown

Inspired by Nina