December 14, 2011 at 1:24 pm
Hi
I was doing restore operation and i cancelled SQL agent job in middle now my DB is stuck in Restoring State. can you suggest me what to do please?
Thanks
December 14, 2011 at 1:29 pm
Drop the database and start the restore from scratch.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
December 14, 2011 at 1:31 pm
Is there any other way rather than to DROP?
December 14, 2011 at 1:45 pm
December 14, 2011 at 1:47 pm
you need to start another restore from the beginning, thats your only option.
you don't actually need to drop the database first
---------------------------------------------------------------------
December 14, 2011 at 1:56 pm
george sibbald (12/14/2011)
you don't actually need to drop the database first
George, will it not fail as the physical database files exist and the rerun job cannot overwrite those files..
Blog -- LearnSQLWithBru
Join on Facebook Page Facebook.comLearnSQLWithBru
Twitter -- BruMedishetty
December 14, 2011 at 2:23 pm
logicinside22 (12/14/2011)
Is there any other way rather than to DROP?
You can try RESTORE WITH RESTART, but unless the restore time is horrendous, probably unnecessary. The option's intended for absolutely huge databases.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
December 14, 2011 at 2:36 pm
Thanks a lot for kind reply and help for everyone i got my database back in normal.
I just did restore process again and worked nicely.
Also got to know about "Restart" option in restore command .
Thanks again Happy holidays
December 14, 2011 at 3:15 pm
Bru Medishetty (12/14/2011)
george sibbald (12/14/2011)
you don't actually need to drop the database firstGeorge, will it not fail as the physical database files exist and the rerun job cannot overwrite those files..
..with replace 🙂
---------------------------------------------------------------------
December 14, 2011 at 7:40 pm
george sibbald (12/14/2011)
Bru Medishetty (12/14/2011)
george sibbald (12/14/2011)
you don't actually need to drop the database firstGeorge, will it not fail as the physical database files exist and the rerun job cannot overwrite those files..
..with replace 🙂
Thanks George for clarifying.. With Replace was mot mentioned in your original reply, so I asked it..
Thanks...
Blog -- LearnSQLWithBru
Join on Facebook Page Facebook.comLearnSQLWithBru
Twitter -- BruMedishetty
July 1, 2013 at 5:30 am
I also face the same issue today. I droped the Db and restored it again.(in my case the backupfile was currupted thst why i got error.
July 1, 2013 at 5:31 am
logicinside22 (12/14/2011)
Is there any other way rather than to DROP?
🙂
July 1, 2013 at 7:20 am
GilaMonster (12/14/2011)
logicinside22 (12/14/2011)
Is there any other way rather than to DROP?You can try RESTORE WITH RESTART, but unless the restore time is horrendous, probably unnecessary. The option's intended for absolutely huge databases.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
March 23, 2014 at 10:47 am
Hi,
There is an article which I've just recently found, article which details everything you need to do in order to avoid getting stuck in RESTORING state next time you do your restore operation.
You can find the article here: http://sqlbak.com/blog/database-stuck-in-restoring-state/
It worked for me so I hope it will help you also.
Good luck!
~ Just some guy trying to tune queries ~
September 29, 2015 at 1:36 am
Hi All,
I had the same issue. My one db was also stuck "restoring". I thought I leave it in that state overnight (non-production) but it never recovered.
Thanks for pointing me in the right direction. This script worked for me:
USE [master]
RESTORE DATABASE [DatabaseName] FROM DISK = N'RestoreFilePathGoeshere' WITH RESTART, FILE = 1, NOUNLOAD, REPLACE, STATS = 5
GO
The with restart was the important part I guess.
Regards,
Michael
Michael Gilchrist
Database Specialist
There are 10 types of people in the world, those who understand binary and those that don't. 😀
Viewing 15 posts - 1 through 14 (of 14 total)
You must be logged in to reply to this topic. Login to reply