I have a database which has been moved from one server to another using
backup/restore. Of course there were some problems with mapping of
userid to logins. That was solved by running sp_change_users_login.
But one problem remains. I had one userid that I had aliased to dbo.
That userid is not listed when using sp_change_users_login 'report' and
it is not possible to drop the alias either.
How can I fix this problem? Delete the userid manually from sysusers or
what?Do you by "alias" mean created with sp_addalias?
If so, can you remove it using sp_dropalias?
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Magnus Bergh" <magnusb@.sbbs.se> wrote in message
news:MPG.2140b997ebb0f77398969f@.msnews.microsoft.com...
>I have a database which has been moved from one server to another using
> backup/restore. Of course there were some problems with mapping of
> userid to logins. That was solved by running sp_change_users_login.
> But one problem remains. I had one userid that I had aliased to dbo.
> That userid is not listed when using sp_change_users_login 'report' and
> it is not possible to drop the alias either.
> How can I fix this problem? Delete the userid manually from sysusers or
> what?
>|||In article <#6dL$Pv6HHA.980@.TK2MSFTNGP06.phx.gbl>,
tibor_please.no.email_karaszi@.hotmail.nomail.com says...
> Do you by "alias" mean created with sp_addalias?
> If so, can you remove it using sp_dropalias?
Yes, the user was aliased to the dbo using sp_addalias. sp_dropalias
doesn't work (probably because the sid doesn't match the sid for the
login).
Note: The database was moved from one server to another server so that
is why I have a problem with users in database does not match the server
logins.|||> sp_dropalias
> doesn't work (probably because the sid doesn't match the sid for the
> login).
Ahh. How about creating a login with the correct SID so the alias matches something and then try
sp_dropalias? Also, note that aliases has been deprecated since 7.0, so you should plan for stop
using them. :-)
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Magnus Bergh" <magnusb@.sbbs.se> wrote in message
news:MPG.21423f1b50bae9779896a0@.msnews.microsoft.com...
> In article <#6dL$Pv6HHA.980@.TK2MSFTNGP06.phx.gbl>,
> tibor_please.no.email_karaszi@.hotmail.nomail.com says...
>> Do you by "alias" mean created with sp_addalias?
>> If so, can you remove it using sp_dropalias?
> Yes, the user was aliased to the dbo using sp_addalias. sp_dropalias
> doesn't work (probably because the sid doesn't match the sid for the
> login).
> Note: The database was moved from one server to another server so that
> is why I have a problem with users in database does not match the server
> logins.
>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment