Monday, March 19, 2012

Database says loading, cannot use it

An attempt to restore database left the database in a loading status. Still have backup and would like to restore, but cannot get database out of loading status. Get message that database is inaccessible and cannot be edited until load is complete. I have tried bouncing the server. Also tried restore with recovery.If you can't drop the database because of the state, open Query Analyzer and
try:
USE MASTER
GO
EXEC sp_configure 'allow updates', 1
RECONFIGURE WITH OVERRIDE
GO
UPDATE sysdatabases SET status = 32768
WHERE name = 'db_name'
GO
Restart SQL Server, reconnect using Query Analyzer
USE MASTER
GO
DROP DATABASE db_name
If that doesn't work, repeat but changing status = 0
Then free up disk space, or whatever you need to do, and try to RESTORE
again (maybe you can allocate this restore to a different drive, if space is
the issue).
--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
"bscottparis" <anonymous@.discussions.microsoft.com> wrote in message
news:BD86FF00-33A2-4147-8B01-688F577190E9@.microsoft.com...
> An attempt to restore database left the database in a loading status.
Still have backup and would like to restore, but cannot get database out of
loading status. Get message that database is inaccessible and cannot be
edited until load is complete. I have tried bouncing the server. Also
tried restore with recovery.

No comments:

Post a Comment