How To Use sp_cycle_errorlog

Before I do any testing I like to execute the sp_cycle_errorlog stored procedure. That way I can quickly see the specific SQL Server log entry without having to scroll / filter through tons of log.

It’s pretty simple to use. Just run this in the query window: sp_cycle_errorlog

Whenever you execute sp_cycle_errorlog the SQL Server log closes the “Current” log and cycles it like a server restart does. So your “current” log becomes #1, #2 becomes #3, and so on. The new “Current” log will only have a couple rows that include Microsoft copyright information, authentication mode, etc. (see screenshot below).

sp_cycle_errorlog

That should make testing and searching through the log MUCH easier!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.