MSSQL-serverMSSQL-server

C:\Program Files\Microsoft SQL Server\MSSQL11.SQLSERVER2012\MSSQL\Log
Error logs files are consuming high disk space.

We can recycle the SQL Server Error Log using sp_cycle_errorlog

You can view the logs and their contents in Management Studio by accessing the “Management” node and by either double clicking or right clicking the logs.

Open management studio, new query and run ” sp_cycle_errorlog ” Each time you run this command, a new log is created and the existing logs are cycled until the max number of allowed error logs is reached.  So you get ErrorLog.1, ErrorLog.2 etc in your log directory. When the max logs is reached, the oldest file is removed.

You can adjust the number of log files to be retained, the minimum is 6 and the maxium is 99 and this can be configured by right clicking the SQL Server Logs node and choosing the configure option.