Microsoft
Software
Hardware
Network
Question : SQL Server 2005 ShrinkFile never finishes
I am having a problem shrinking files on a database. My db has 4 data files and is a moderatly active system. I cannot take it down for any period of time.
The 4 data files have grown to about 58-60 GBs. We did maintenance and archiving and I need to shrink them back to around 40 GBs. When I run shrinkfile it gets about 50% complete then hangs, I am checking it in sys.dm_exec_requests and I can see it flounder on wait_resources endlessly.
I just assumed i was trying to go from a too large amount. I have tried ever decreasing sizes, and now I am at 5 MBs and it will not complete (I haven't gotten a single file to shrink by even 1 MB). Trying to shrink by 5mb, it hangs at 99.998% complete for hours. I have tried issuing checkpoints before and after and even durning.
Here is one example.
File size is 58507 and the file is 50% full
I am running DBCC SHRINKFILE (Filename,58505);
This command has been running while I type this for over an hour.
What am I doing wrong? Any advice would be greatly appreciated.
Answer : SQL Server 2005 ShrinkFile never finishes
Ah, you've split it. OK, then this is going to take a LONG time. As I said, I have a 100GB database on a very powerful server (look at the specs for a Dell 6950) and it takes hours to shrink a 100GB database.
Random Solutions
Windows Storage Server 2003 will not start after SQL Server 2005 Uninstall
How do I Setup small Network from XP laptop to Vista Desktop for a File Transfer?
creating simple music loop in flash.
Exchange Monitoring
Easily Posting Flyers to Craigslist from an already existing website
How to add exchange system manager to another server
Email anomaly - two joined together.
HP Thin Client Configuration Questions
BES Server Backup Script
Excel 2003 Macro to change values in a column