Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

database in restore state

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

like image 590
user3569267 Avatar asked Nov 17 '17 18:11

user3569267


1 Answers

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
like image 106
Hadi Avatar answered Sep 21 '22 15:09

Hadi