Thursday, November 15, 2012

Recycle SQLServer Error Log file

Recycle SQLServer Error Log:

SQL Server error log captures and stores server level and db level information(including errors) and stores it in a file called “ERRORLOG” by default location is….
D:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\Log\ERRORLOG
This will be re-created everytime whenever SQL Services are restarted and sometimes opening error log file takes longer time to open because it is very big, instead of maintaining one big errorlog file you can slim down by running below query.


sp_cycle_errorlog

To read current errorlog file
Xp_readerrorlog

No comments:

Post a Comment