You are here: Re: Exchange of login for database user « MsSQL Server « IT news, forums, messages
Re: Exchange of login for database user

Posted by Erland Sommarskog on 08/24/05 14:31

Peter CCH (petercch.wodoy@gmail.com) writes:
> I tried in this sequence:
> 1. sp_changedbowner 'user1'
> 2. sp_change_users_login 'Update_One', 'user1', 'login1'
>
> But "2" still give me the same error:
> -----------------------------
> Server: Msg 15063, Level 16, State 1, Procedure sp_change_users_login,
> Line 104
> The login already has an account under a different user name.
> -----------------------------

Of course. Since login1 owns the database, login1 maps to the user
dbo, and cannot map to the user user1. You need to change to a different
owner, for instance sa.


--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinfo/productdoc/2000/books.asp

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация