Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
SQL Server 2008
»
SQL Server 2008 Administration
»
Size of Log file too big
Size of Log file too big
Rate Topic
Display Mode
Topic Options
Author
Message
abdielmomo
abdielmomo
Posted Tuesday, November 13, 2012 7:16 AM
Grasshopper
Group: General Forum Members
Last Login: Sunday, May 12, 2013 12:34 PM
Points: 13,
Visits: 40
I have discovered yesterday that the size of the log file on my database has increased to 55 Gb while the datafile is 8 Gb. The users are complaining that applications using this database are very slow. The server is sql server 2008 R2.
What can i quickly do to reduce the size of the log file? The free space disk on my server is 35 MB!
Thanks in advance.
Post #1384077
hs24
hs24
Posted Tuesday, November 13, 2012 7:26 AM
Right there with Babe
Group: General Forum Members
Last Login: Yesterday @ 2:35 AM
Points: 765,
Visits: 329
What you need to ensure is that you have a suitable back-up policy in place.
If the Database is in Full recovery then you need to ensure that you run regular transaction log backups and a daily full backup.
If in simple recovery then you shall need to ensure that you run a full backup at least daily depending on your RPO and RTO.
can you confirm what recovery model is being used by the database?
If it is in full recovery ensure that a full backup has been taken and then run a transaction log backup. After this you may be able to run DBCC Shrinkfile against the
DB Log file
Post #1384087
anthony.green
anthony.green
Posted Tuesday, November 13, 2012 7:34 AM
SSCertifiable
Group: General Forum Members
Last Login: Friday, April 12, 2013 3:51 AM
Points: 5,075,
Visits: 4,831
Managing Transaction Logs -
http://www.sqlservercentral.com/articles/Administration/64582/
Why is my transaction Log full -
http://www.sqlservercentral.com/articles/Transaction+Logs/72488/
Stairway to Transaction Log management -
http://www.sqlservercentral.com/stairway/73776/
Recovery Models -
http://msdn.microsoft.com/en-us/library/ms189275.aspx
Accidental DBA Guide - Chapter 8 -
http://www.sqlservercentral.com/articles/books/76296/
SQL Server Backup & Restore -
http://www.sqlservercentral.com/articles/books/89519/
Comming Soon
SQL Server Transaction Log Management -
http://www.sqlservercentral.com/articles/books/94938/
Want an answer fast? Try here
How to post data/code for the best help - Jeff Moden
Need a string splitter, try this - Jeff Moden
How to post performance problems - Gail Shaw
CrossTabs-Part1
&
Part2 - Jeff Moden
SQL Server Backup, Integrity Check, and Index and Statistics Maintenance - Ola Hallengren
Managing Transaction Logs - Gail Shaw
Troubleshooting SQL Server: A Guide for the Accidental DBA - Jonathan Kehayias and Ted Krueger
Post #1384095
miazaidi
miazaidi
Posted Thursday, November 15, 2012 3:15 AM
Forum Newbie
Group: General Forum Members
Last Login: Tuesday, May 21, 2013 11:37 PM
Points: 1,
Visits: 43
User would have performed large DML operation, DELETE or UPDATE
Shrink you database, it will reduce the size of your .ldf as well as .mdf
USE [DATABASE NAME]
GO
DBCC SHRINKDATABASE(N'DATABASE NAME' )
GO
Post #1385032
anthony.green
anthony.green
Posted Thursday, November 15, 2012 3:17 AM
SSCertifiable
Group: General Forum Members
Last Login: Friday, April 12, 2013 3:51 AM
Points: 5,075,
Visits: 4,831
miazaidi (11/15/2012)
User would have performed large DML operation, DELETE or UPDATE
Shrink you database, it will reduce the size of your .ldf as well as .mdf
USE [DATABASE NAME]
GO
DBCC SHRINKDATABASE(N'DATABASE NAME' )
GO
Why shrink database when the OP said it was the log?
Also you do know the implications of shrinking a database?
Want an answer fast? Try here
How to post data/code for the best help - Jeff Moden
Need a string splitter, try this - Jeff Moden
How to post performance problems - Gail Shaw
CrossTabs-Part1
&
Part2 - Jeff Moden
SQL Server Backup, Integrity Check, and Index and Statistics Maintenance - Ola Hallengren
Managing Transaction Logs - Gail Shaw
Troubleshooting SQL Server: A Guide for the Accidental DBA - Jonathan Kehayias and Ted Krueger
Post #1385035
GilaMonster
GilaMonster
Posted Thursday, November 15, 2012 4:03 AM
SSC-Dedicated
Group: General Forum Members
Last Login: Today @ 3:18 PM
Points: 37,744,
Visits: 30,025
miazaidi (11/15/2012)
User would have performed large DML operation, DELETE or UPDATE
Shrink you database, it will reduce the size of your .ldf as well as .mdf
USE [DATABASE NAME]
GO
DBCC SHRINKDATABASE(N'DATABASE NAME' )
GO
No, don't do that. It'll fragment the indexes, cause performance problems and probably won't solve the large log problem
Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
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
Post #1385070
GilaMonster
GilaMonster
Posted Thursday, November 15, 2012 4:05 AM
SSC-Dedicated
Group: General Forum Members
Last Login: Today @ 3:18 PM
Points: 37,744,
Visits: 30,025
Most likely full recovery model and no log backups. See the first article that Anthony posted.
One other point, a large log will no cause poor performance. Shrinking a log will not improve performance.
Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
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
Post #1385072
« Prev Topic
|
Next Topic »
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.