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
VPN access to a non-PDC W2K3 Server
Lotus Domino LDAP connection to MS Exchange
thumbnail slider click through to url help
Office Service pack 3 TIff file association
Conducting Regular Expressions on a text file (Ruby)
Creating a New View - ActiveRecord::RecordNotFou<wbr />nd in CardsController#show
How do I permanently embed Windows Media Player in my taskbar?
The Web site that is referenced here is not in the configuration database.
Windows explorer keeps on reloading my taskbar, shortcuts etc.
Powershell script/snippet to count/subtotal Exchange 2003 mail messages by message class