Remove user from role via SQL

  • Hi All,

    I've got a case where I'm moving a database between different domains, and want to remove users from a predefined role before the move. I do not want to drop the role itself as it has all the permissions set up the way we need it.

    I've not been able to find the SQL to remove a specified user from a role easily. If anyone know of a concise method, it'd be greatly appreciated.

    Thanks!

  • To remove a user from a database role, use exec sp_droprolemember [rolename], [username].

    Colleen



    Colleen M. Morrow
    Cleveland DBA

  • 🙂 Thanks so much. Glad it was an easy answer.

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

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