SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Log space issue


Log space issue

Author
Message
Steve Jones
Steve Jones
SSC Guru
SSC Guru (61K reputation)SSC Guru (61K reputation)SSC Guru (61K reputation)SSC Guru (61K reputation)SSC Guru (61K reputation)SSC Guru (61K reputation)SSC Guru (61K reputation)SSC Guru (61K reputation)

Group: Administrators
Points: 61597 Visits: 19099
It doesn't affect the database, but if the space is needed, the log will grow if autogrow is enabled, and stop accepting transactions if it isn't.

The size of the log should be set based on the workload. Nothing else.

Follow me on Twitter: @way0utwest
Forum Etiquette: How to post data/code on a forum to get the best help
My Blog: www.voiceofthedba.com
GilaMonster
GilaMonster
SSC Guru
SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)

Group: General Forum Members
Points: 86292 Visits: 45232
New persopn (10/19/2013)
here i have shrink the log now we got 30 gb space. here we have 360gb log now. can i reduce it up to 300gb.


No way to answer that. We don't know your environment, we don't know how large the log needs to be. Maybe you can, maybe you can't, maybe it'll grow straight back, maybe it won't.

You need to do some investigations, see what it is that requires the most log space, how much it needs, whether or not it can be tuned.

Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass


New persopn
New persopn
Old Hand
Old Hand (339 reputation)Old Hand (339 reputation)Old Hand (339 reputation)Old Hand (339 reputation)Old Hand (339 reputation)Old Hand (339 reputation)Old Hand (339 reputation)Old Hand (339 reputation)

Group: General Forum Members
Points: 339 Visits: 657
Thanks for u r information. i will monitor the log for few days and i will let you know how much it is occupying.
dbassassin
dbassassin
SSC-Enthusiastic
SSC-Enthusiastic (112 reputation)SSC-Enthusiastic (112 reputation)SSC-Enthusiastic (112 reputation)SSC-Enthusiastic (112 reputation)SSC-Enthusiastic (112 reputation)SSC-Enthusiastic (112 reputation)SSC-Enthusiastic (112 reputation)SSC-Enthusiastic (112 reputation)

Group: General Forum Members
Points: 112 Visits: 290
If your log has experienced lots of autogrowth you might want to check the number of vlfs. I've seen 3 cases in the wild where vlfs have been extremely high, mostly on 2008 r2 sp1 (sp2 has the fix).

Why is it that people who can't take advice always insist on giving it? - James Bond, Casino Royale
New persopn
New persopn
Old Hand
Old Hand (339 reputation)Old Hand (339 reputation)Old Hand (339 reputation)Old Hand (339 reputation)Old Hand (339 reputation)Old Hand (339 reputation)Old Hand (339 reputation)Old Hand (339 reputation)

Group: General Forum Members
Points: 339 Visits: 657
How can i check whether how many virtual log files in log
GilaMonster
GilaMonster
SSC Guru
SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)

Group: General Forum Members
Points: 86292 Visits: 45232
DBCC loginfo



Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass


George M Parker
George M Parker
SSC Eights!
SSC Eights! (840 reputation)SSC Eights! (840 reputation)SSC Eights! (840 reputation)SSC Eights! (840 reputation)SSC Eights! (840 reputation)SSC Eights! (840 reputation)SSC Eights! (840 reputation)SSC Eights! (840 reputation)

Group: General Forum Members
Points: 840 Visits: 1472
New persopn (10/22/2013)
How can i check whether how many virtual log files in log


Check out the following blog as well as the "'8 Steps to better transaction log throughput" link that it refers to.

http://www.sqlskills.com/blogs/kimberly/transaction-log-vlfs-too-many-or-too-few
dbassassin
dbassassin
SSC-Enthusiastic
SSC-Enthusiastic (112 reputation)SSC-Enthusiastic (112 reputation)SSC-Enthusiastic (112 reputation)SSC-Enthusiastic (112 reputation)SSC-Enthusiastic (112 reputation)SSC-Enthusiastic (112 reputation)SSC-Enthusiastic (112 reputation)SSC-Enthusiastic (112 reputation)

Group: General Forum Members
Points: 112 Visits: 290
Here is a link to Michelle Ufford's post on getting the VLF count

http://sqlfool.com/2010/06/check-vlf-counts/

Another great tool comes from Pedro Lopes

http://blogs.msdn.com/b/blogdoezequiel/archive/2011/07/21/sql-swiss-army-knife-10-vlfs-again-what-s-your-current-status.aspx

Cheers

Why is it that people who can't take advice always insist on giving it? - James Bond, Casino Royale
New persopn
New persopn
Old Hand
Old Hand (339 reputation)Old Hand (339 reputation)Old Hand (339 reputation)Old Hand (339 reputation)Old Hand (339 reputation)Old Hand (339 reputation)Old Hand (339 reputation)Old Hand (339 reputation)

Group: General Forum Members
Points: 339 Visits: 657
Thanks for your information.

as per your script i have executed in our server.

see the below resilts:

Actual log size: 369409.0
Used_log_size_mb :128.0
potential_log_size :368000.0
actual_VLF's :2890
used Vlf's:1
Potential_VLFs :736
growth_iteration :46
Log_initial_size:8000.0
File_auto_growth_mb:1024.0

Please advise me how can i take action here to reduce the log
dbassassin
dbassassin
SSC-Enthusiastic
SSC-Enthusiastic (112 reputation)SSC-Enthusiastic (112 reputation)SSC-Enthusiastic (112 reputation)SSC-Enthusiastic (112 reputation)SSC-Enthusiastic (112 reputation)SSC-Enthusiastic (112 reputation)SSC-Enthusiastic (112 reputation)SSC-Enthusiastic (112 reputation)

Group: General Forum Members
Points: 112 Visits: 290
The link that George Parker posted http://www.sqlskills.com/blogs/kimberly/transaction-log-vlfs-too-many-or-too-few/ is a good place to start.

Basically, observe the size of your log. During a maintenance window shrink that puppy down as small as possible then expand it to the observed max size. Adjust your auto growth

2k+ is not uncommon, but not ideal, in my environment 99+ would be too high. Using Pedro's query you can check the size each growth iteration to see if you are bugged. I've seen databases where 200k VLFs were reached by 248KB growth per iteration (fixed by applying the latest service pack)

You might want to start a new thread for this specific question so that some of the pros can chime in

Why is it that people who can't take advice always insist on giving it? - James Bond, Casino Royale
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search