Solved

MSSQL Server Log Current vs. Archive

Posted on 2011-02-22
4
387 Views
Last Modified: 2012-06-22
By default my SQL 2005 DB server keeps the current SQL Server Log and 6 Archives.  As I look at the archives, there doesn't seem to be any clear indicator of what time frame those logs would cover.  The amount of logs, date range for each log etc seems to be variable.

What triggers SQL to decide to start a new log?  

Thanks
0
Comment
Question by:GMSDev
4 Comments
 
LVL 11

Accepted Solution

by:
dodge20 earned 167 total points
ID: 34955047
From MSDN:

A new error log is created each time an instance of SQL Server is started, although the sp_cycle_errorlog system stored procedure can be used to cycle the error log files without having to restart the instance of SQL Server. Typically, SQL Server retains backups of the previous six logs and gives the most recent log backup the extension .1, the second most recent the extension .2, and so on. The current error log has no extension.
0
 
LVL 5

Assisted Solution

by:robertg34
robertg34 earned 167 total points
ID: 34955074
The log is cycled when the sql service is restarted.  The number of log files can be set and by default is 6.  

More information:

" Increase SQL Server log history threshold in order to maintain logs for a longer amount of time.

Under the Management folder, right-click on SQL Server Logs and select Configure. By default SQL Server will keep 6 error logs before they are recycled. I increase this to 99, which is the maximum value."

From Ken Simmons at:
http://www.sqlservercentral.com/articles/Administration/64732/
0
 
LVL 142

Assisted Solution

by:Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3] earned 166 total points
ID: 34958627
I have scheduled a DBCC ERRORLOG command on all my servers to force the cycling, as I restart the sql servers only rarely...
http://www.sql-server-performance.com/tips/dbcc_commands_p1.aspx
0
 

Author Comment

by:GMSDev
ID: 34994937
Thank all for the info.
0

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question