Sunday, February 12, 2012

Cannot restore sql user id?

Hi there,
I'm using MSSQL 2000 Standard Edition. I perform a full
database backup and restore to another server (same
version) with same database name.
Every things is OK except the sql user id I created on the
source id. Is not showing in the destination server user
id.
I try to create back the user id in the destination server
with same user name and password but still fail.
What I need to do is delete the user in the database and
recreate plus set back the permissions again!
It is any ways to backup and restore not only the table
and data but also the user id and permission even I
restore to another server?
Thanks.
ChaiWhen you restore or attach a database from another server, the mapping
between syslogins and sysusers for SQL logins gets out-of-sync. The
database userid is still there but it may be either orphaned or mapped to
the wrong login.
You can correct the mismatch with sp_change_users_login. See the Books
Online <tsqlref.chm::/ts_sp_ca-cz_8qzy.htm> for details.
Hope this helps.
Dan Guzman
SQL Server MVP
"Chai" <anonymous@.discussions.microsoft.com> wrote in message
news:89b801c404bb$2df36da0$a401280a@.phx.gbl...
> Hi there,
> I'm using MSSQL 2000 Standard Edition. I perform a full
> database backup and restore to another server (same
> version) with same database name.
> Every things is OK except the sql user id I created on the
> source id. Is not showing in the destination server user
> id.
> I try to create back the user id in the destination server
> with same user name and password but still fail.
> What I need to do is delete the user in the database and
> recreate plus set back the permissions again!
> It is any ways to backup and restore not only the table
> and data but also the user id and permission even I
> restore to another server?
> Thanks.
> Chai

No comments:

Post a Comment