I thought I have successfully restored a backup from another instance of
MSDE, however in my .NET program I am getting an error message about the
login failed. So what I did is create a login id using sp_grantlogin. I
assume that this allows my Windows login to be authenticated. Just in case,
I also added a new login account using sp_addlogin. Those both worked.
Now when I do...EXEC sp_grantaccess to the database, I get an error:
Database cannot be opened. It is in the middle of a restore.
When I was restoring, I did the RESTORE FILELISTONLY to get the names of the
files in the backup. I then did RESTORE DATABASE using WITH and MOVE which
announced it was successful, and the two files were placed into the
directory. I thought this was it, what did I miss?
Thanks,
Brad
Make sure you use WITH RECOVERY (the default) othewise the database will be
left in a state where it is expecting to continue the restore process using
additional backup sets. Also if you are moving databases from one server to
another you will need to synchronize the users using sp_change_users_login
(see the BOL for this one).
Jim
"AllcompPC" <allcomppc@.sbcglobal.net> wrote in message
news:%23LZHQ0HEFHA.624@.TK2MSFTNGP09.phx.gbl...
>I thought I have successfully restored a backup from another instance of
> MSDE, however in my .NET program I am getting an error message about the
> login failed. So what I did is create a login id using sp_grantlogin. I
> assume that this allows my Windows login to be authenticated. Just in
> case,
> I also added a new login account using sp_addlogin. Those both worked.
> Now when I do...EXEC sp_grantaccess to the database, I get an error:
> Database cannot be opened. It is in the middle of a restore.
> When I was restoring, I did the RESTORE FILELISTONLY to get the names of
> the
> files in the backup. I then did RESTORE DATABASE using WITH and MOVE
> which
> announced it was successful, and the two files were placed into the
> directory. I thought this was it, what did I miss?
> Thanks,
> Brad
>
|||Thank you Jim. I got it and it seems to be working fine.
Brad
"Jim Young" <thorium48@.hotmail.com> wrote in message
news:eY58HwIEFHA.228@.tk2msftngp13.phx.gbl...
> Make sure you use WITH RECOVERY (the default) othewise the database will
be
> left in a state where it is expecting to continue the restore process
using
> additional backup sets. Also if you are moving databases from one server
to[vbcol=seagreen]
> another you will need to synchronize the users using sp_change_users_login
> (see the BOL for this one).
> Jim
> "AllcompPC" <allcomppc@.sbcglobal.net> wrote in message
> news:%23LZHQ0HEFHA.624@.TK2MSFTNGP09.phx.gbl...
I
>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment