|
|
Posted by Erland Sommarskog on 08/25/05 17:28
Peter CCH (petercch.wodoy@gmail.com) writes:
> I tried the code, it still give me the same error.
> I just notice there's something different for current state and before
> the problem exist state:
>
> I expand the SQL Server tree node, Security > Logins
> Then I open the properties page of "login1" and go to "Database Access"
> tab.
>
> This is what it looks now:
>
> Permit Database User
> ------------------------------------------------
> (checked) DB1 user1
> (checked) DB2 user1
> (checked) DB3 dbo
Thus login1 is still the owner of DB3. Did you run sp_changedbowner in
DB3?
What does sp_helpdb say?
What does DB3..sp_helpuser say when run it in DB3?
> QUESTION: Is there any way for me to change the "dbo" at column "User"
> back to "user1"?
Yes, change the database owner of the database to anyone else by user1.
Then use sp_change_users_login, or simply drop and re-add user.
--
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
[Back to original message]
|