Solved

shrink log performance sql server 2008

Posted on 2014-04-01
4
431 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
ID: 39971603
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
ID: 39972058
Carl what happens if you try to remove all the excess space at once?
0
 
LVL 52

Expert Comment

by:Carl Tawn
ID: 39972078
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
ID: 39984772
Thanks Carl!
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
migration MS SQL database to Oracle 30 59
Need help on t-sql 2012 10 53
Live Storage Vmotion VMs with shared VMDK 10 55
Sql server insert 13 27
I have a large data set and a SSIS package. How can I load this file in multi threading?
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

808 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