Solved

MSSQL Server Log Current vs. Archive

Posted on 2011-02-22
4
384 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

932 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now