Solved

SQL 2005  - Set Transaction Logs Size

Posted on 2008-06-25
5
1,174 Views
Last Modified: 2012-06-22
Hi all

On our corporate SQl server we hve numberous Database on or two if which grow very aast and large,  we have tried setting the trnsaction log file sizes by

SQl Server Management Studio > Right Click Database > Properties > Files > Initial Size " 14000, Grow by 10%,  Restricted file growth 2,097,152,, but the transaction log files regularly grows to 4 -6 GB in size and we hve to manually truncate the log file to release teh space

Any thoughts on why this woudl be happening.

What is the best way to set q a limit on teh ransaction log of a database,

Regards, Alan

0
Comment
Question by:Singnetsvc
  • 2
  • 2
5 Comments
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
Comment Utility
if the database is in full recovery mode, it requires regular (hourly, for example) transaction log backups
using those backups, it will make the log file will reuse it's internal space, and not grow endless.

if you are 200% sure you will never need a recovery to a point in time, you could change the database to simple recovery, hence the space can be reused automatically.
0
 
LVL 22

Accepted Solution

by:
dportas earned 500 total points
Comment Utility
The person who is responsible for backing up these servers needs to understand Recovery Models and determine what kind of backup and recovery strategy to use. If your are regularly growing and shrinking then that person probably isn't doing their job properly, which ought to be a cause for concern. You could start here:
http://technet.microsoft.com/en-us/library/ms189275.aspx
0
 
LVL 3

Author Comment

by:Singnetsvc
Comment Utility
The Database is a transaction log for TFS Version control.

A full backup of teh database backup sets are carried out every four hours.

Is there a reason why teh max file size specified is esceeding it set limit, i was under the impression that if the max value was reached it woudl recycle teh oldest informatino first etc etc

Alan.
0
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
Comment Utility
>Is there a reason why teh max file size specified is esceeding it set limit, i was under the impression that if the max value was reached it woudl recycle teh oldest informatino first etc etc

the max file size for the transaction log will keep the file from growing, but also from transactions to be committed when the t-log is full.

so, if you have a tlog backup (note: a full backup will NOT clear the t-log !) every 4 hours, and the t-log file is still growing, you have 2 possible situations:
* the transactions in those 4 hours require more space than the size allocated
   => reduce the time interval of the backups from 4 hours to 2 hours, for example, during high traffic
   => ensure all transactions do only update the rows/columns they really need to update

* there is some old open transaction keeping the log from recycling.
  => DBCC OPENTRAN should tell

0
 
LVL 3

Author Closing Comment

by:Singnetsvc
Comment Utility
Link lead to script that help automate process
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

This article will describe one method to parse a delimited string into a table of data.   Why would I do that you ask?  Let's say that you need to pass multiple parameters into a stored procedure to search for.  For our sake, we'll say that we wa…
by Mark Wills Attending one of Rob Farley's seminars the other day, I heard the phrase "The Accidental DBA" and fell in love with it. It got me thinking about the plight of the newcomer to SQL Server...  So if you are the accidental DBA, or, simp…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

771 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

11 Experts available now in Live!

Get 1:1 Help Now