I tired to restore my database but I saw that I am restoring a wrong one, so I immediately kill the process. Unfortunately the database was in restoring state and is not accessible anymore.
Can anyone help me to return back to normal state?
Thanks in advance
Hadi
37.5k13 gold badges72 silver badges128 bronze badges
asked Nov 17, 2017 at 18:26
-
1SQL Server: Database stuck in "Restoring" state but if you restored with overwrite your unlikely to be able to return to the state prior to the aborted restore (without another restore)Alex K.– Alex K.2017年11月17日 18:31:09 +00:00Commented Nov 17, 2017 at 18:31
-
Possible duplicate of SQL Server: Database stuck in "Restoring" stateIgor– Igor2017年11月17日 19:05:53 +00:00Commented Nov 17, 2017 at 19:05
1 Answer 1
Try using the following query to return your database online
RESTORE DATABASE MyDatabase
WITH RECOVERY
If it throws an exception so you need to restore from a latest backup
RESTORE DATABASE MyDatabase
FROM DISK = 'C:\MyDatabase.bak'
WITH REPLACE,RECOVERY
answered Nov 17, 2017 at 19:04
Sign up to request clarification or add additional context in comments.
Comments
Explore related questions
See similar questions with these tags.
lang-sql