• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 481
  • Last Modified:

shrink log performance sql server 2008

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
pae2
Asked:
pae2
  • 2
  • 2
1 Solution
 
Carl TawnSystems and Integration DeveloperCommented:
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
 
pae2Author Commented:
Carl what happens if you try to remove all the excess space at once?
0
 
Carl TawnSystems and Integration DeveloperCommented:
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
 
pae2Author Commented:
Thanks Carl!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now