• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 662
  • Last Modified:

Database stuck in restoring state

Hi experts, I'm learning SQL server 2005 and after taking a small database offline in SSMS, when I brought it back online it is restoring...and I can't do anything with it.  How can I get it off this status?  I have a backup so can overwrite it if necessary.

Thanks
0
colinspurs
Asked:
colinspurs
  • 3
  • 3
2 Solutions
 
chapmandewCommented:
hmm....how long has it been restoring?  did you use ssms to take it offline?

you can try this:

restore database YourDBName
with recovery
0
 
colinspursAuthor Commented:
Thanks for your response.  To give you an idea, the backup file amounts to 24MB.  It's been restoring for a couple of hours.  Perhaps that's not long enough, I don't know.  Yes, I did take it offline via SSMS.

I tried the restore with recovery and got the message "The database cannot be recovered because the log was not restored".
0
 
chapmandewCommented:
hmm....how did you go about restoring this file?
0
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

 
colinspursAuthor Commented:
Ah, ok, I was practising backing it up and restoring before I took it offline, so I probably made a mistake along the way...I need to overwrite it with yesterday's backup I guess.
0
 
chapmandewCommented:
Yeah...give that a shot.
0
 
Racim BOUDJAKDJIDatabase Architect - Dba - Data ScientistCommented:
Please describe the restore process...Among the common causes of restore failure:

> Incorrect Restore parameters
> The restore is still in NO RECOVERY mode
> Corrupted database backup
> Missing log files

Hope this helps...
0
 
colinspursAuthor Commented:
Thanks guys, restored successfully from backup.  As I'm new to all this, I could be a good source of points in the future!

Col
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now