---
title: "SQL Server: Database stuck in “Restoring” state"  
description: "SQL Server: Database stuck in “Restoring” state"  
author: "Manoj Bhatt"  
published: 2013-05-15  
updated: 2013-05-15  
canonical: https://www.mindstick.com/forum/884/sql-server-database-stuck-in-restoring-state  
category: "mssql server"  
tags: ["mssql server"]  
reading_time: 2 minutes  

---

# SQL Server: Database stuck in “Restoring” state

Hi Expert!\
I [backed up](https://answers.mindstick.com/qa/41054/in-three-decisions-in-the-early-1800s-whose-powers-were-backed-up-by-the-supreme-court) a data as following\
BACKUP DATABASE MyDatabaseTO DISK = 'MyDatabase.bak'WITH INIT --overwrite existing\
And then tried to restore it:\
[RESTORE DATABASE](https://www.mindstick.com/forum/243/restore-database) MyDatabase FROM DISK = 'MyDatabase.bak' WITH [REPLACE](https://yourviews.mindstick.com/view/81330/cow-antibody-research-in-usa-a-step-ahead-to-replace-plasma-therapy) --force restore over specified databaseAnd now the database is stuck in the [restoring state](https://www.mindstick.com/forum/33467/model-db-in-restoring-state-can-t-start-sql-server).\
Some people have theorized that it's because there was no [log file](https://www.mindstick.com/articles/327201/create-log-file-in-c-sharp) in the backup, and it needed to be rolled forward using:\
RESTORE DATABASE MyDatabaseWITH [RECOVERY](https://www.mindstick.com/blog/23170/3-tips-on-applying-recovery-principles-to-building-a-successful-business)Except that, of course, fails:\
Msg 4333, Level 16, State 1, Line 1The database cannot be recovered because the log was not restored.Msg 3013, Level 16, State 1, Line 1RESTORE DATABASE is terminating abnormally.And exactly what you want in a catastrophic situation is a restore that won't work.\
The backup contains both a data and log file:\
RESTORE FILELISTONLY FROM DISK = 'MyDatabase.bak'\
Logical Name PhysicalName============= ===============MyDatabase C:\Program Files\[Microsoft SQL](https://www.mindstick.com/forum/159597/my-sql-server-vs-microsoft-sql-server-which-one-better) Server\MSSQL.1\MSSQL\DATA\MyDatabase.mdfMyDatabase_log C:\Program Files\Microsoft [SQL Server](https://www.mindstick.com/articles/12999/what-is-table-valued-function-in-sql-server)\MSSQL.1\MSSQL\DATA\MyDatabase_log.LDF\
Please help me!Thanks in advance!

## Replies

### Reply by AVADHESH PATEL

Hi Manoj!\
You need to use the WITH RECOVERY option, with your [database](https://www.mindstick.com/articles/12226/use-of-database-in-sencha-extjs-and-insert-record-from-user-form-using-ajax) RESTORE command, to bring your database online as part of the restore process.\
This is of course only if you do not intend to restore any transaction log backups, i.e. you only wish to restore a database backup and then be able to access the database.\
Your command should look like this,\
RESTORE DATABASE MyDatabase FROM DISK = 'MyDatabase.bak' WITH REPLACE,RECOVERY\
You may have more success using the restore database wizard in SQL Server Management Studio. This way you can select the specific file locations, the overwrite option, and the WITH Recovery option.\
I hope it helpful to you!\


---

Original Source: https://www.mindstick.com/forum/884/sql-server-database-stuck-in-restoring-state

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
