I'm trying to remove a user that is a dbo on several databases on an instance of SQL 2005. When I try to delete the user it give me the error "Login 'RptAdmin' owns one or more database(s). Change the owner of the database(s) before dropping the login. (Microsoft SQL Server, Error: 15174)"
The odd thing is that when I look at the dbo user under the security of the database it shows the user name is dbo but the login name as RptAdmin. Any suggestions on how I can remove the RptAdmin login or take away the dbo rights to a database so I can delete the login?
You can use sp_changedbowner to change the owner of the db to a login other than RptAdmin. Here is an example to change the owner to sa on the current database.
You can test this on a "test" server to make sure it is giving you what you desire.
The security you see with login as RptAdmin and user as dbo is normal.
Hope this helps!