Solved

How big should T-Logs be?

Posted on 2010-09-16
12
267 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
  • 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
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 

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 69

Accepted Solution

by:
Scott Pletcher earned 500 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 69

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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.
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…

809 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