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
LVL 3
colinspursAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server 2005

From novice to tech pro — start learning today.