Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 ShrinkDatabase/File Fails

Author  Topic 

durilai
Starting Member

13 Posts

Posted - 2009-04-24 : 04:15:24
I have a very large SQL Server 2005 database (900 GB). It was a SQL 2000, but migrated to 2005. I am in the process of migrating to another DB and deleting large chucks of image data.

When I do a batch the disk space is not unallocated, and I am attempting to do so using SHRINKDATABASE/SHRINKFILE, but then both fail. I have tried detaching and reattaching, increasing MDF file size both of which were solutions I found through searching. Neither have worked.

Below is the error I receive, any help or guidance would be greatly appreciated!


------------------------------
TITLE: Microsoft SQL Server Management Studio
------------------------------

Shrink failed for Database 'DBNAME'. (Microsoft.SqlServer.Smo)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.4035.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Shrink+Database&LinkId=20476

------------------------------
ADDITIONAL INFORMATION:

An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)

------------------------------

A severe error occurred on the current command. The results, if any, should be discarded. (Microsoft SQL Server, Error: 0)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.4035&EvtSrc=MSSQLServer&EvtID=0&LinkId=20476

------------------------------
BUTTONS:

OK
------------------------------

nr
SQLTeam MVY

12543 Posts

Posted - 2009-04-24 : 05:09:58
Have you tried a checkdb?

How many database files do you have? Have you tried migrating to other files?

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page
   

- Advertisement -