Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««12

Auto Close and Auto Shrink - Just Don't Expand / Collapse
Author
Message
Posted Tuesday, May 6, 2003 5:56 AM
SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: Moderators
Last Login: Monday, November 17, 2014 2:20 PM
Points: 6,800, Visits: 1,914
I don't know that it's as simple as just changing it to simple mode. I run on average about 200 db's, all fully logged. On any given day maybe 25% are really being used. I run log backups 4 times a day, but I run a second job that backs up any log over 50mb (arbitrary, pick a # you like) and then shrinks the log. This gives me a usage based backup, plus keeps disk usage in check. The time it takes to shrink a log is pretty small compared with a db backup. Switching to simple doesn't alleviate the problem of space usage, one big transaction can balloon up the file size way beyond what it "normally" is.



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




Andy
SQLAndy - My Blog!
Connect with me on LinkedIn
Follow me on Twitter
Post #61223
Posted Wednesday, May 7, 2003 8:15 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Tuesday, September 16, 2014 5:15 AM
Points: 399, Visits: 819
I agree that Auto Close is a silly option. It potentially causes more headaches than it is worth. Rdb (purchased by Oracle several years ago) has the same goofy feature.

On the other hand, we use Auto Shrink at our site. We have about 40 SQL Server machines with roughly 800 databases spread across them. Most of our Production servers are beefy machines (most with 4 CPUs, some with 8 CPUs), and many of our larger Production databases reside on (high-priced) EMC disk storage. Auto Shrink helps us to conserve disk space. So far, I have only noticed Auto Shrink causing a performance problem on one database in particular--that SQL 7.0 database is heavily updated throughout the day, and we disabled Auto Shrink for it. I haven't noticed any Auto Shrink problems with SQL 2000 at this point.

As long as you recognize the potential problems that Auto Shrink can create, I don't see any problem with trying the feature. If it causes problems, you can always turn it off. Auto Shrink has certainly stopped a lot of disk space-related phone calls on our Development boxes.

Just my 2 cents... Another 48 will buy you a (small) cup of coffee.




Post #61224
Posted Wednesday, May 7, 2003 8:19 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Tuesday, September 16, 2014 5:15 AM
Points: 399, Visits: 819
By the way, several people alluded to shrinking the databases during off hours. Would anyone care to post the syntax they use?

Thanks




Post #61225
Posted Wednesday, May 7, 2003 11:37 AM
Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Wednesday, December 24, 2008 11:15 AM
Points: 575, Visits: 35
On the databases I have AutoClose off. It's one of those really bright ideas that no one wants.

Autoshrink is off because I found it twice trying to shrink itself during a very heavy I/O time (which added to the length of time for the process).

I just use DBCC SHRINKFILE(table, size).

Patrick


Quand on parle du loup, on en voit la queue
Post #61226
Posted Thursday, May 8, 2003 7:20 AM


SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Friday, November 14, 2014 1:49 PM
Points: 932, Visits: 370
Having read the advice regarding auto_shrink, I checked our database and found that several did indeed have that option on.

Rather than simply turning it off (we have gobs of space available, but I don't know that I want to let things grow without bounds), I decided to see if SQL Server 2000 provided a simple way to do this. Surprise, surprise, you can set a time to shrink in your maintenance plan. We'll be doing weekly shrinks (once the database grows to twice its current size, that is).




R David Francis
Post #61227
Posted Tuesday, May 13, 2003 2:05 PM
SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Tuesday, November 5, 2013 9:05 AM
Points: 976, Visits: 59
Most of our databases in production use auto shrink. None of them use auto close.

I suspect the reason we have not noticed much in the way of a performance hit is because it is rare to have large amounts of data deleted during peak hours. Whenever a customer issues a delete command what really happens is a delete column is flagged as deleted. Some months later this data is moved to an archive table in the same database. So all our databases are gradually growing which means the auto shrink probably doesn't often try to shrink our databases.

Robert W. Marda
SQL Programmer
bigdough.com
The world’s leading capital markets contact database and software platform.




Robert W. Marda
SQL Programmer
Ipreo
Post #61228
Posted Wednesday, May 14, 2003 5:45 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Tuesday, September 16, 2014 5:15 AM
Points: 399, Visits: 819
Robert,

I suspect that is why we do not tend to see problems with Auto Shrink as well. "Purge" does not seem to be in our Developers' vocabulary. The majority of our databases tend to grow steadily so there is little to shrink, except for the log files.

Jon




Post #61229
Posted Wednesday, May 5, 2004 5:55 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, March 11, 2009 8:00 AM
Points: 3, Visits: 4

yeh.. um.. ok, there must be times where you have to auto-shrink!  Isn't there? or is it completely dud and useless?

 

Post #114466
Posted Wednesday, March 3, 2010 8:37 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, March 3, 2010 9:36 AM
Points: 1, Visits: 18
If auto-shrink is turned on , is there any possible side effects on the database if you turn it off ?
Post #876041
« Prev Topic | Next Topic »

Add to briefcase ««12

Permissions Expand / Collapse