Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Database (restoring....)

Author  Topic 

mart0369
Starting Member

11 Posts

Posted - 2008-09-29 : 12:55:59
I ran a database restore, and the transaction came back 100% complete, but when I try to access the database, it has the (Restoring...) next to the name, and I cannot access the data.

It has been like that for an hour.

comments?

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-09-29 : 13:00:53
Because you restored in NORECOVERY MODE. You should restore in RECOVERY MODE. How big was your database?
Go to Top of Page

mart0369
Starting Member

11 Posts

Posted - 2008-09-29 : 13:03:29
2016MB in size, and it was from a file backup. The option (Recovery mode) was selected in the wizard before the execution.
Go to Top of Page

james_wells
Yak Posting Veteran

55 Posts

Posted - 2008-09-29 : 19:23:53
What is your recovery model

i am guessing "Simple" as the system would force a TAIL LOG
backup otherwise, prior to restore.

It does look like a WITH NORECOVERY has been issued either by design or in error when recovering the database as it is the WITH RECOVERY that would bring the database online once all aspects of the restore operation had been completed.

-- Restore database without restoring the data -----
RESTORE DATABASE databasename
WITH RECOVERY








Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-09-29 : 19:45:45
Try refreshing your screen as sometimes it won't do this after a restore with recovery, so it'll appear like it's still restoring yet it's done.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

mart0369
Starting Member

11 Posts

Posted - 2008-09-30 : 11:04:11
Thanks for the input guys. Yes the model is simple.

I tried the sql line you gave and the following errors came up:
Msg 913, Level 16, State 8, Line 1
Could not find database ID 65535. Database may not be activated yet or may be in transition.
Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.
Go to Top of Page

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-09-30 : 11:25:08
Post your full command for Restore.
Go to Top of Page

mart0369
Starting Member

11 Posts

Posted - 2008-09-30 : 11:27:51
I used the sql server 2005 wizard to preform the restore. I restored from a bak file and made sure the 'with recovery' option was selected.

The wizard completed the task with no errors, but the database still says '(resstoring....)'

I tried the restore sql statement that was suggested above, and got the message above.
Go to Top of Page

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-09-30 : 11:36:04
Don't you see Script as button in upper left, even if you do with GUI. Post the command.
Go to Top of Page

mart0369
Starting Member

11 Posts

Posted - 2008-09-30 : 11:46:39
Well...

It would seem that the sql manager does not like to restore the database when you select the file or filegroup option.

I re-restored the database using the 'device' option and specifing the .mdf file location. It worked fine the first try. I'm not sure why this way worked and not the other, because the scripts that were generated from both methods looked the same.

Either way, problem solved. Cheers to those you gave suggestions.
Go to Top of Page

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-09-30 : 14:17:26
quote:
Originally posted by mart0369

Well...

It would seem that the sql manager does not like to restore the database when you select the file or filegroup option.

I re-restored the database using the 'device' option and specifing the .mdf file location. It worked fine the first try. I'm not sure why this way worked and not the other, because the scripts that were generated from both methods looked the same.

Either way, problem solved. Cheers to those you gave suggestions.



Didn't get that?
Go to Top of Page

NeilG
Aged Yak Warrior

530 Posts

Posted - 2008-10-01 : 07:13:59
if you are using the ssms make sure that the with recovery is ticked
Go to Top of Page
   

- Advertisement -