Question : Auto Shrink in SQL 2005

Hi Experts
Few questions
1. What is auto shrink option in SQL 2005?
2. How do I disable it?
3. What is the advantage and disadvantage of auto shrink?

Thanks

Answer : Auto Shrink in SQL 2005

1. What is auto shrink option in SQL 2005?
Automatically shrinks the database at a scheduled interval.

2. How do I disable it?
It shouldn't be enabled by default.  To disable:
Right Click the database > properties.
Choose Options
In the list, find "Auto Shrink".  Ensure it is set to false.

3. What is the advantage and disadvantage of auto shrink?
Advantage:  If you have LOW disk space, and your database should normally be small but OCCASIONALLY balloons for a short period of time, it can help recover the space.
Disadvantages: Physical File Fragmentation.  When the database is growing and shrinking, it will fragment on the physical disk.  This is in addition to index fragmentation.  What you end up with is a database that is spread all across your disk and WINDOWS can't access if efficiently.  

If you set your database size correctly, it should never need to be shrunk.  And growth can be managed by monitoring free space.
Random Solutions  
 
programming4us programming4us