Solved

SQL 2005  - Set Transaction Logs Size

Posted on 2008-06-25
5
1,209 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 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 21864079
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
ID: 21864138
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
ID: 21864152
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 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 21864171
>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
ID: 31470496
Link lead to script that help automate process
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Stored procedure 4 35
How to import SQL 2000 database to SQL 2014 5 138
SQL Server 2005 - Comparing Fields' Contents 6 44
What is this datetime? 1 19
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…
I am showing a way to read/import the excel data in table using SQL server 2005... Suppose there is an Excel file "Book1" at location "C:\temp" with column "First Name" and "Last Name". Now to import this Excel data into the table, we will use…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

856 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