Pages

Tuesday, August 14, 2012

create new error log file without restarting SQL Server

How to create a new errorlog file without restarting SQL Server


Can we do so ?

Answer is YES

We have two scenarios where we can accomplish this task

1. You can truncate (essentially create a new log) the Current Server log by running DBCC ERRORLOG

2. You can accomplish the same thing using this stored procedure: sp_cycle_errorlog

Both the above options will create a new ErrorLog file of SQL Server.

Hope the above information helps

Thanks