?
Solved

How big should T-Logs be?

Posted on 2010-09-16
12
Medium Priority
?
273 Views
Last Modified: 2012-05-10
Im guessings there isnt a definate answer to this. Im also guessing weather the DB is OLAP or OLTP would effect.

We have a database that is currently 14gb for the .mdf and 15gb for the .ldf is that right? I read that the log files could grow if a transaction is never closed?

the database is in full recovery mode we do full backsup every night, diff every 3 hours during work ours and then 30 mins for tlogs.

None of the other database we have run this high (Tlogs reach this size). Im just wondering if there is a problem and how would i find out if there was/fix it?

thanks for any input.

s
0
Comment
Question by:stebennettsjb
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
  • 2
  • +1
12 Comments
 
LVL 60

Expert Comment

by:chapmandew
ID: 33691805
So, your db is 14gb and your log file is 15?  
0
 

Author Comment

by:stebennettsjb
ID: 33691901
yep.
0
 
LVL 60

Expert Comment

by:chapmandew
ID: 33691924
and the log file itself continues to grow?  how often does it grow?
0
10 Questions to Ask when Buying Backup Software

Choosing the right backup solution for your organization can be a daunting task. To make the selection process easier, ask solution providers these 10 key questions.

 

Author Comment

by:stebennettsjb
ID: 33692055
It seems to be staying at this size. the whole of our log folder doesnt seem to change to much gone i think its used 2gb in the last few days. It was just the sheer size i thought was strange.

0
 
LVL 60

Expert Comment

by:chapmandew
ID: 33692076
Could be that the db was created w/ a file that size.  I'd keep an eye on it.  It won't shrink itself, but if it gets larger you may have a problem.  Log files are not like data files, so long as you keep backing them up, the size of the file will not get larger if there are no long running transactions keeping others from being backed up.

0
 

Author Comment

by:stebennettsjb
ID: 33692290
in properties of the DB the orginal size of the log was 14.920kb and has auto growth at 10% now sits at 15,277,824kb

is there a way to see if there a long running transaction doing it?

thanks

s
0
 
LVL 39

Expert Comment

by:BrandonGalderisi
ID: 33692516
It's no so much a long running transaction issue (unless the transaction is spanning over log backups).  How large are your 30 minute transaction log backups?  How large is your largest transaction log backup?

If your log backups are generally 1-2GB but occasionally you get a 10GB log backup, then your log should be 10GB + some extra space so it doesn't fill.  
0
 

Author Comment

by:stebennettsjb
ID: 33692560
well actually i just posted the backups as well.

Its setup to do full differential and log backups to the same file. So i cant tell you that unless someone knows how to?

Cheers

s
0
 
LVL 39

Expert Comment

by:BrandonGalderisi
ID: 33692577
Yeah.... that's PROBABLY not a good idea.
0
 

Author Comment

by:stebennettsjb
ID: 33692622
didnt think it was  :/ im new to SQL and looking at what our current setup is (/cry) to try and improve it.. backups was the major one where i found it rather strange to say the least.

0
 
LVL 70

Accepted Solution

by:
Scott Pletcher earned 2000 total points
ID: 33693423
You need to change the 10%.  That's way too much space to add to the log at once.  Use a fixed amount, like 200M (or 300M or 500M if you think you need it).

Run a DBCC OPENTRAN just to make sure you don't some old trans you don't know about forcing the log to remain "unbackedup" and thus unreuseable.
0
 
LVL 70

Expert Comment

by:Scott Pletcher
ID: 33693432
Log space *must* be preformatted and the db access pauses while the log is extended -- and a 1.5G+ extension will take a *long* time (barring exceptionally fast drives).
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Your data is at risk. Probably more today that at any other time in history. There are simply more people with more access to the Web with bad intentions.
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

719 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