Cannot Drop the User DBO

  • 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?

    Thanks!

  • diane.payne (8/3/2009)


    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?

    Thanks!

    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.

    sp_changedbowner 'sa'

    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!

  • I am a novice with sql databases, but I am learning very quickly.

    Would the fact that "dbo" is the user and login name is "RptAdmin" become a problem when communicating between a reporting server and the database server?

    Thanks for your assistance!!

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply