Lists associations between security principals and proxies.
When no parameters are provided, sp_enum_login_for_proxy lists information about all logins in the instance for every proxy.
When a proxy id or proxy name is provided, sp_enum_login_for_proxy lists logins that have access to the proxy. When a login name is provided, sp_enum_login_for_proxy lists the proxies that the login has access to.
When both proxy information and a login name are provided, the result set returns a row if the login specified has access to the proxy specified.
This stored procedure is located in msdb.
A. Listing all associations
The following example lists all permissions established between logins and proxies in the current instance.
USE msdb ; GO EXEC dbo.sp_enum_login_for_proxy ; GO
B. Listing proxies for a specific login
The following example lists the proxies that the login terrid has access to.
USE msdb ; GO EXEC dbo.sp_enum_login_for_proxy @name = 'terrid' ; GO