Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Auto Close and Auto Shrink - Just Don't


Auto Close and Auto Shrink - Just Don't

Author
Message
Mike Pearson
Mike Pearson
SSC Rookie
SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)

Group: General Forum Members
Points: 27 Visits: 1
Comments posted to this topic are about the content posted at http://www.sqlservercentral.com/columnists/mpearson/autocloseandautoshrinkjustdont.asp



chrisleonard
chrisleonard
SSC Eights!
SSC Eights! (970 reputation)SSC Eights! (970 reputation)SSC Eights! (970 reputation)SSC Eights! (970 reputation)SSC Eights! (970 reputation)SSC Eights! (970 reputation)SSC Eights! (970 reputation)SSC Eights! (970 reputation)

Group: General Forum Members
Points: 970 Visits: 67
Another problem with autoshrink is simplf that it moves data. You might work very hard to make sure your tables, indexes, etc., get built contiguously only to have autoshrink make mincemeat of all your hard work. Like the author says: no thanks.

One possible exception: a sandbox / desktop server where space really *might* matter that much and performance might *not*.



Dave Gall
Dave Gall
Forum Newbie
Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)

Group: General Forum Members
Points: 9 Visits: 48
I agree regarding auto close, but disagree regarding auto shrink. Reason: I have many databases to deal with some of which grow their logs very fast eating up valuable disk space. Auto shrink ensures that unused space is returned to the pool. I feel that the CPU performance hit is acceptable compared to the problems ensuing when we run out of disk space.



Andy Warren
Andy Warren
SSCertifiable
SSCertifiable (7.3K reputation)SSCertifiable (7.3K reputation)SSCertifiable (7.3K reputation)SSCertifiable (7.3K reputation)SSCertifiable (7.3K reputation)SSCertifiable (7.3K reputation)SSCertifiable (7.3K reputation)SSCertifiable (7.3K reputation)

Group: Moderators
Points: 7255 Visits: 2679
Dave, I agree that leaving space tied up may not be a good thing, but wouldn't you consider it better to either do after hours or at a time when you knew it would least impact performance?

Andy
http://www.sqlservercentral.com/columnists/awarren/

Andy
SQLAndy - My Blog!
Connect with me on LinkedIn
Follow me on Twitter
Steve Jones
Steve Jones
SSC-Dedicated
SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)

Group: Administrators
Points: 36316 Visits: 18752
Just Say No. Control when the shrinking takes place if you need to worry about it. Though I'd say if you are tight on disk space, you've got other issues.

Steve Jones
sjones@sqlservercentral.com
http://www.sqlservercentral.com/columnists/sjones
www.dkranch.net

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
ckempste
ckempste
SSC Eights!
SSC Eights! (885 reputation)SSC Eights! (885 reputation)SSC Eights! (885 reputation)SSC Eights! (885 reputation)SSC Eights! (885 reputation)SSC Eights! (885 reputation)SSC Eights! (885 reputation)SSC Eights! (885 reputation)

Group: General Forum Members
Points: 885 Visits: 1
Hi there

Experience tells me to manage it yourself in terms of shrinking (when it happens, what is going on and sync it with other jobs that may be going on). The trick to watch a little more carefully I believe is your growth settings and not chewing space that perhaps wont be used for sometime. Managing transaction log space utilisation is another tricky one, especially if you have the occasional very large job that blows out the log size.

Btw, I havent measured the performance hit whilst files are expanding or shrinking during heavy IO... I like to monitor growth and get a feel for this to ensure files cater for the expansion (reserved space) without sqlserver working to grab more space.

The close option is a silly one and I never set it. I have come across some issues of connections locking up and blocking because of it. Its probably been resolved between versions etc etc but I cant see any logical value in it.

Cheers

Chris K


Chris Kempster
www.chriskempster.com
Author of "SQL Server Backup, Recovery & Troubleshooting"
Author of "SQL Server 2k for the Oracle DBA"
spaski
spaski
Grasshopper
Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)

Group: General Forum Members
Points: 10 Visits: 1
With the whole shrinking we use truncating of the transaction log as well.
At the end of the day(during normal at hours-middle of the night) we do all the shrinking etc, but we truncate the transaction log. This saves alot of space for backup purpose.

Is this bad good or ugly.

Cheers



ckempste
ckempste
SSC Eights!
SSC Eights! (885 reputation)SSC Eights! (885 reputation)SSC Eights! (885 reputation)SSC Eights! (885 reputation)SSC Eights! (885 reputation)SSC Eights! (885 reputation)SSC Eights! (885 reputation)SSC Eights! (885 reputation)

Group: General Forum Members
Points: 885 Visits: 1
I would shrink during a quiet time (if there is any) for your DBMS, get a feel for the average times taken and move the times around from there.

As for the truncation of the logs, so long as you dont require point in time (PTR) recovery, then its a no issue.

Cheers

Ck


Chris Kempster
www.chriskempster.com
Author of "SQL Server Backup, Recovery & Troubleshooting"
Author of "SQL Server 2k for the Oracle DBA"
Mike Pearson
Mike Pearson
SSC Rookie
SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)

Group: General Forum Members
Points: 27 Visits: 1
RE truncating the Logs - if you're going to go to the effort of truncating 'em - why not just set the database to simple logging and be done with it?

RE Dave comment's about AutoShrink - Dave - can you not set up an alert+job to backup the transaction log when it get's to (say) 80% capacity? That way you don't have the CPU hit of a log file that is constantly growing and shrinking...



AFPeterson
AFPeterson
SSC Veteran
SSC Veteran (258 reputation)SSC Veteran (258 reputation)SSC Veteran (258 reputation)SSC Veteran (258 reputation)SSC Veteran (258 reputation)SSC Veteran (258 reputation)SSC Veteran (258 reputation)SSC Veteran (258 reputation)

Group: General Forum Members
Points: 258 Visits: 1
For production system, I agree, just say no. Manage space usage based on the business needs (slow time) and don't rely on Auto Shrink.

I've found some "production" systems such as Crystal Reports that use MSDE with auto close enabled. so review every install, and do an inventory of all your production system if you need to.


What's the business problem you're trying to solve?
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