Can do delete a user account

  • Hello I have restore a database from backup to a test box and under the main database under securiyt there is a user that we would like to delete and we are getting an error:

    The Selected user cannot be dropped because the user owns object, however, there are other users under the security and we are able to delete.

    Any idea would be appreciated. Can we delete is from sysuser table???

  • The user cannot be dropped because they owner objects in the database.  Run this to find out which objects (change the name FRED to the user you are trying to drop):

        select o.name
        from sysobjects o
        join sysusers u
        on u.uid = o.uid
        where u.name = 'FRED'
        order by o.name

    You will them either need to drop those objects first or change the owner of those objects.  Have a look at "sp_changeobjectowner" or this ms knowledge base for details on changing the owner:

    http://support.microsoft.com/default.aspx?kbid=275312

     

  • Thank you

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

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