Solved

How big should T-Logs be?

Posted on 2010-09-16
12
271 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
Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

 

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

 Database Backup and Recovery Best Practices

Join Percona’s, Architect, Manjot Singh as he presents Database Backup and Recovery Best Practices (with a Focus on MySQL) on Thursday, July 27, 2017 at 11:00 am PDT / 2:00 pm EDT (UTC-7). In the case of a failure, do you know how long it will take to restore your database?

Question has a verified solution.

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

This article shows the steps required to install WordPress on Azure. Web Apps, Mobile Apps, API Apps, or Functions, in Azure all these run in an App Service plan. WordPress is no exception and requires an App Service Plan and Database to install
In this series, we will discuss common questions received as a database Solutions Engineer at Percona. In this role, we speak with a wide array of MySQL and MongoDB users responsible for both extremely large and complex environments to smaller singl…
Via a live example, show how to setup several different housekeeping processes for a SQL Server.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

630 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