SQL 7
Have a user: John
Restored a backup database, of which John is aliased to the dbo
However, cannot connect as John to this database.
Tried to drop and recreate him, but it does not work, he is sort of
ghosting..
Is in Roles, Public as \John (I have NO idea what that \ means, but it
seems to be the problem)
sp_droprole 'John' or '\John' - says John doesnt exist
sp_dropuser 'John' or '\John' - says John doesnt exit
sp_addalias or sp_adduser says - cant add john, already exists as user or
role in the database !
I deleted the LOGIN and recreated, then went to the databsae sp_addalias
'John','dbo' - said it worked, but still cannot login as John and connect to
this database.
BTW: User must be 'John' as is built into the application .
Anyone 'Try this in TSQ
Use 'YourDatabase
sp_change_users_login 'auto_fix', 'YourLoginUser
This is a classic example of a broken login after restoring a backup from one machine to another. Logins have the SID of the machine they created on|||Thanks Kelly,
I have used this , many times, in the past, but its not working on this one
(number of orphaned users: 0, number fix: 0)
It seems to have something to do with the \ in front of the user name, and I
dont know what that means...cuz I can do this for OTHER users and it works
no problem...
"Kelly" <anonymous@.discussions.microsoft.com> wrote in message
news:FA0EA8D0-D72A-47C5-AC78-F81523F9579A@.microsoft.com...
> Try this in TSQL
> Use 'YourDatabase'
> sp_change_users_login 'auto_fix', 'YourLoginUser'
>
> This is a classic example of a broken login after restoring a backup from
one machine to another. Logins have the SID of the machine they created on.
>
>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment