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

When AutoShrink will occur in SQL server 2008? Expand / Collapse
Author
Message
Posted Thursday, December 13, 2012 6:01 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Wednesday, March 12, 2014 9:41 PM
Points: 29, Visits: 408
When AutoShrink will occur in SQL server 2008? When autoshrink set true...

But in SQL server 2000, we can schedule the auto shrink .. In the same Manner is it possible to schedule autoshrink in sql server 2008?

Please Suggest!!!


Saranya

Post #1396146
Posted Thursday, December 13, 2012 6:32 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 9:35 AM
Points: 12,206, Visits: 9,169
Do you have a good reason to use AutoShrink? Because it will mess up the fragmentation of your indexes.



How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?

Member of LinkedIn. My blog at LessThanDot.

MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1396159
Posted Thursday, December 13, 2012 8:08 AM


SSCoach

SSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoach

Group: General Forum Members
Last Login: Monday, April 14, 2014 1:34 PM
Points: 15,442, Visits: 9,588
Autoshrink will shrink the database when there's 25% space available, per http://msdn.microsoft.com/en-us/library/bb522682.aspx.

But it's almost always a really, really, really bad idea to turn on autoshrink.

You can also schedule a database/file shrink to run at a regular interval through an SQL Agent job. Very easy to do. Details here: http://msdn.microsoft.com/en-us/library/ms189080.aspx

Again, this is a really bad idea and I recommend that you not do it.

Shrinking a database should be done only when it absolutely has to. It has significant impact on performance issues (index fragmentation), file level issues (physical fragmentation), can have a negative effect on backup/recovery plans, and a few other issues.

I can't stress too much that automatically shrinking a database, either through a scheduled job or through autoshrink, is really, really bad.


- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread

"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
Post #1396210
Posted Thursday, December 13, 2012 9:49 PM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Wednesday, March 12, 2014 9:41 PM
Points: 29, Visits: 408
Its not Recommended only .. However One DB size is 800GB, but free space available is 400GB.
When started shrinking the free space its taking more than 2-3Days . After 2-3 days we are shrinking upto 5-10GB Space alone... There is no User transaction to DB like select or Insert...

How i Can recover Free space?? Highly Suggest me!!
Post #1396473
Posted Thursday, December 13, 2012 11:28 PM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 11:52 AM
Points: 41,530, Visits: 34,446
saranya.priyadharshini (12/13/2012)
How i Can recover Free space?? Highly Suggest me!!


DBCC ShrinkFile. There's no other way (other than copying the data to a new DB and dropping the old one)

Let me guess, lots of LOB data? That makes shrink very slow.



Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #1396489
Posted Thursday, December 13, 2012 11:57 PM


Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Thursday, August 01, 2013 10:17 AM
Points: 323, Visits: 984
GilaMonster (12/13/2012)
saranya.priyadharshini (12/13/2012)
How i Can recover Free space?? Highly Suggest me!!


DBCC ShrinkFile. There's no other way (other than copying the data to a new DB and dropping the old one)

Let me guess, lots of LOB data? That makes shrink very slow.



or moving the table(or rebuiding clustered index) to the new filegroup ?


-----------------------------------------------------------------------------
संकेत कोकणे
Post #1396496
Posted Friday, December 14, 2012 12:50 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Wednesday, March 12, 2014 9:41 PM
Points: 29, Visits: 408

Let's i will try ...
Post #1396509
Posted Friday, December 14, 2012 3:09 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 11:52 AM
Points: 41,530, Visits: 34,446
sanket kokane (12/13/2012)
GilaMonster (12/13/2012)
saranya.priyadharshini (12/13/2012)
How i Can recover Free space?? Highly Suggest me!!


DBCC ShrinkFile. There's no other way (other than copying the data to a new DB and dropping the old one)

Let me guess, lots of LOB data? That makes shrink very slow.



or moving the table(or rebuiding clustered index) to the new filegroup ?


And then? Shrink the old filegroup? Will still have the problem with lob pages making the shrink slow.



Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #1396538
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse