Getting rid of login from public role.

  • Hi all,

    I have restored one of our databases from one server to another and even though the user does not show in EM when I run a sp_helpuser or select * from sysusers the user appears.

    I have tried to run sp_dropuser 'username' but it says User 'username' does not exist in the current database.

    The user is orphaned as their is no associated login on the new server.

    Any ideas?

     

    Carl

  • As the user was a group I had to run the sp_revokedbaccess 'username'

     

    regards

     

    Carl

  • For database orphan users, do below steps

    1. Try adding Login on the server.

    2. sp_change_users_login procedure to fix mismatch between login and User

    3. Now either use or drop the user.

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

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