[ @name = ] 'name'
[ @proxy_id = ] id,
[ @proxy_name = ] 'proxy_name'
@name= ] ' name'
The name of a SQL Server principal, login, server role, or
msdb database role to list proxies for. The name is , with a default of NULL. nvarchar(256)
@proxy_id= ] id
The proxy identification number of the proxy to list information for. The
proxy_id is , with a default of NULL. Either the int id or the proxy_name may be specified.
@proxy_name= ] ' proxy_name '
The name of the proxy to list information for. The
proxy_name is , with a default of NULL. Either the sysname id or the proxy_name may be specified.
0 (success) or 1 (failure)
Proxy identification number.
The name of the proxy.
Name of the security principal for the association.
Type of the security principal.
0 = SQL Server login
1 = Fixed system role
2 = Database role in msdb
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
Execution permissions for this procedure default to members of the
sysadmin fixed server role.
A. Listing all associations
The following example lists all permissions established between logins and proxies in the current instance.
USE msdb ;
EXEC dbo.sp_enum_login_for_proxy ;
B. Listing proxies for a specific login
The following example lists the proxies that the login
terrid has access to.
USE msdb ;
@name = 'terrid' ;
Did you find this helpful?
( 1500 characters remaining)
Thank you for your feedback