Solved

shrink log performance sql server 2008

Posted on 2014-04-01
4
427 Views
Last Modified: 2014-04-07
Is there a performance concern when shrinking a log file, generally?

This is the first time I'm shrinking a log and I scheduled it after-hours as I was unsure of the performance impact.

Thanks,

pae2
0
Comment
Question by:pae2
  • 2
  • 2
4 Comments
 
LVL 52

Accepted Solution

by:
Carl Tawn earned 500 total points
Comment Utility
Generally it should be OK performance wise as long as you shrink it in smallish chunks, rather than trying to remove all the excess space at once.
0
 

Author Closing Comment

by:pae2
Comment Utility
Carl what happens if you try to remove all the excess space at once?
0
 
LVL 52

Expert Comment

by:Carl Tawn
Comment Utility
Shrinking the file is going to require IO activity. The bigger chunk you try to shrink in one go the higher, and longer the IO activity. Shrinking in chunks should reduce the IO requirement, and the potential for the operation to fail. I'd usually shrink at around 512MB at a time.

Also, don't forget to take a full backup before shrinking anything. And bear in mind that regular log backups should prevent the log file from growing excessively large in the first place.
0
 

Author Comment

by:pae2
Comment Utility
Thanks Carl!
0

Featured Post

Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

Join & Write a Comment

In this article I will describe the Detach & Attach method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

763 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now