Granting proxy authorization

System Security Officers use the grant set proxy or grant set session authorization command to give a user permission to impersonate another user within the server. The user with this permission can then execute either set proxy or set session authorization to become another user.

To grant proxy authorization permission, you must be a System Security Officer and execute the grant command from the master database. The syntax is:

grant set proxy
     to {public | name_list | role_name} 

or

grant set session authorization
     to {public | name_list | role_name} 

where:

To grant set proxy to an application with the login “appl” if you do not have sso_role currently active, and you are not in the master database, execute:

use master
go
set role sso_role on
go
grant set proxy to appl
go

To grant set proxy to that user-defined role “accountant,” execute:

grant set proxy to accountant

To grant set session authorization to the “sa” account, whose user name in every database is “dbo,” execute:

grant set proxy to dbo