Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Cannot Drop the User DBO Expand / Collapse
Author
Message
Posted Monday, August 3, 2009 10:09 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, September 2, 2010 1:05 PM
Points: 2, Visits: 97
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!
Post #764207
Posted Monday, August 3, 2009 10:23 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Friday, August 29, 2014 9:15 AM
Points: 244, Visits: 742
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!
Post #764222
Posted Monday, August 3, 2009 11:43 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, September 2, 2010 1:05 PM
Points: 2, Visits: 97
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!!
Post #764275
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse