Solved

MSSQL Server Log Current vs. Archive

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

762 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

18 Experts available now in Live!

Get 1:1 Help Now