Transfer permissions from one domain to another in SQL Server

At the bottom of most stored procedures, we have a grant similar to

GRANT EXECUTE ON [dbo].[uspFOO] TO [DOMAIN\SQLServerUsers]

Fortunately for me, our domain is changing, and now we need to go through and change the permissions. Does anyone know an easy way to do this using the DB metadata so that I can pull out all the places where [DOMAIN \ SQLServerUsers] got permission to run and replace it with [DOMAIN2 \ SQLServerUsers]?

Thank.

For those who ask, this is on SQL Server 2005.

+3
source share
1 answer

What version of SQL Server are you using?

In 2005 and above you could

  • create a new db_executor database role and run

    GRANT EXECUTE TO db_executor
    
  • provide the database role to all the right users

"catch all", (!!) . , ! ( , , procs)

, GRANT EXECUTE ........

+1

Source: https://habr.com/ru/post/1734435/


All Articles