sql server
SQL Server database stuck in RESTORING
A
Desh-Duniya Team
Author
Sometimes the database is in a restoring state after restarting the machine or for some other reason. It usually happens with big databases when a long transaction is in progress and an unexpected server shutdown or restart occurs.
If you have this problem, try this first:
RESTORE DATABASE [databasename] WITH RECOVERY
If you receive an error that the database is in use, try to set the user to single user mode:
USE master;
GO
ALTER DATABASE Database_name
SET SINGLE_USER
WITH ROLLBACK IMMEDIATE;