SQL Server Database stuck in Restoring state

Posted by WorldofCode on Jul 22nd, 2010
2010
Jul 22

From time to time your sql database will get stuck in Restoring state.  Here are two different ways to get your database out of restoring state. 

RESTORE DATABASE MyDatabase 
   FROM DISK
= ‘MyDatabase.bak’ 
   WITH REPLACE
,RECOVERY

or
  1. Stop the service (MSSQLSERVER);
  2. Rename or delete the Database and Log files (C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data…) or wherever you have the files;
  3. Start the service (MSSQLSERVER);
  4. Delete the database with problem;
  5. Restore the database again.

 

 

View Similar Posts

 

Leave a Comment




XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.