|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Tuesday, May 14, 2013 6:11 AM
Points: 185,
Visits: 941
|
|
hello experts, how can i know before shrinking the maximum size which can be relaeased by shrinking a database.
thanks in advance
|
|
|
|
|
SSC-Dedicated
           
Group: General Forum Members
Last Login: Yesterday @ 12:59 PM
Points: 37,640,
Visits: 29,895
|
|
Why do you want to shrink? Databases tend to grow as more data gets put in them. It's in their nature.
Shrinking causes massive fragmentation and will just result in the data file growing again next time data gets added. When that happens, the entire system will slow down as the file is expanded. Also repeated shrinks and grows will cause fragmentation at the file-system level, which is hard to fix.
See - http://sqlinthewild.co.za/index.php/2007/09/08/shrinking-databases/
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
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Tuesday, May 14, 2013 6:11 AM
Points: 185,
Visits: 941
|
|
| ya but the things is, we dont have much space in disk, we have around 600 databases in our UAT server, so for getting space m trying to remove older backups, thinking to shrink databases, right now we dont have approval for adding extra disk space so i have been told to do management for the space of disk even i need to shrink DBs or delete older DBs, so is there any way for the same what asked before and to know also which databases are useless or not in use so that i can delete them from our UAT server.
|
|
|
|
|
SSC-Dedicated
           
Group: General Forum Members
Last Login: Yesterday @ 12:59 PM
Points: 37,640,
Visits: 29,895
|
|
Use sp_spaceused
As for unused databases, no easy way.
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
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Monday, May 13, 2013 2:21 AM
Points: 194,
Visits: 684
|
|
To find out if a DB is not used anymore set it offline and wait for someone to complain :) If noone complains, then you have one less DB to worry about.
Seriously though, one way to know if a DB is not in use is to take a trace (only audit login/logout) and see if there is any login activity other than the maintenance jobs.
Let it run a few days to be sure (week-end included) then if there are no activity do a full backup, zip it, archive it and drop the DB after leaving it offline for some time.
|
|
|
|