2

my database is stuck in restoring state for a few days. I have been told there is no active connection and to "Kill it". how do I do this? what command do I execute

Abbaskhan
  • 87
  • 2
  • 10
  • 1
    select * from sys.dm_exec_results in this query see the Process id and Kill it – mohan111 May 04 '16 at 09:58
  • 2
    This happens if you issue a `RESTORE` that fails to complete, or a `RESTORE ... WITH NORECOVERY` (if you're doing a partial restore). Either restore a backup successfully, or drop the database. No amount of connection twiddling will make a difference. Also see http://stackoverflow.com/questions/520967/ . – Jeroen Mostert May 04 '16 at 10:01
  • what database do I run select * from sys.dm_exec_results against as I can see the restoring database – Abbaskhan May 04 '16 at 10:10
  • Possible duplicate of [SQL Server: Database stuck in "Restoring" state](https://stackoverflow.com/questions/520967/sql-server-database-stuck-in-restoring-state) – Matt Oct 28 '19 at 11:50

0 Answers0