First of all, I know I shouldn't do a shrink file because it causes fragmentation. however, I am working with a 3rd party tool and the vendor would like us to shrink the DB so we can move the DB and upgrade the application.
I am running a SQL 2005 DB on a SQL server 2008 R2 SP2 server.
I am running the following query within the DB that I need to shrink.
DBCC SHRINKFILE ('SCData_Default', 73559);
the size of the DB is 73559 MB. So I'm only trying to shrink the DB right by 200 MB. The query takes ~20 minutes to run. I see a lot of pageIOLatches when i run the Activity Monitor. After a while, I lose connection to the server from my query window and the database was never shrunk.
I've also encountered an error that stated the "database could not locate file for database in 'master' in sys.databases..." However, like I stated previously I am running the query in the DB that I need to be shrunk.
I have also run:
DBCC SHRINKFILE (1, 73559);
with the above issues as well.
The database is in Simple recovery mode.
What can I do to fix this and be able to shrink the DB?