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
Auto-Reply for Exchange 2003 Account
Website
Bash Scripting problem
powershell HELP!! Reading file and separating text to seperate files
Startup & Shutdown problems
HOW TO CONFIGURE DNS IN REDHAT LINUX?
How do I permanently embed Windows Media Player in my taskbar?
Creating a New View - ActiveRecord::RecordNotFou<wbr />nd in CardsController#show
Script to take password automatically
Office Service pack 3 TIff file association