Sp_changedbowner will return message 'the proposed new database owner is already a user in the database' if the sysdatabases/sysusers mapping is out of sync and the sysusers dbo SID is already mapped to the login. All you need to do is execute sp_changedbowner twice, once to change ownership to a different login and again to change it to the desired user.
The fix is described here
USE MyDatabase
EXEC sp_addlogin 'TempOwner'
EXEC sp_changedbowner 'TempOwner'
EXEC sp_changedbowner 'sa'
EXEC sp_droplogin 'TempOwner'
Popularity: 34% [?]


(3 votes, average: 4.00 out of 5)
Latest Comments