Articles

Affichage des articles du juin, 2012

How To Safely Delete SQL Server ErrorLog Files

One of your SQL Server ErrorLog files has grown to a very large size.  You would like to delete it to free space on my hard drive.  Can the SQL Server ErrorLog file be safely deleted without harming SQL Server? By default SQL Server stores seven ErrorLog files named: ErrorLog ErrorLog.1 ErrorLog.2 ErrorLog.3 ErrorLog.4 ErrorLog.5 ErrorLog.6 In SQL Server 2005 and later versions, the ErrorLog files are stored in the c:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG folder.  The ErrorLog file contains the newest information; the ErrorLog.6 file contains the oldest information. Every time SQL Server is restarted, the log files cycle as follows: All data in the ErrorLog.6 file is deleted and a new ErrorLog file is created. All data in the previous ErrorLog file is written to the ErrorLog.1 file. All data in the previous ErrorLog.1 file is written to the ErrorLog.2 file. etc. If one of the ErrorLog files has grown to a large size, the ErrorLog files can be manually cy