Export (0) Print
Expand All
Expand Minimize

sp_enum_proxy_for_subsystem (Transact-SQL)

Lists permissions for SQL Server Agent proxies to access subsystems.

Topic link iconTransact-SQL Syntax Conventions

sp_enum_proxy_for_subsystem
    [ @proxy_id = ] proxy_id,
    [ @proxy_name = ] 'proxy_name',
    [ @subsystem_id = ] subsystem_id,
    [ @subsystem_name = ] 'subsystem_name'

[ @proxy_id = ] proxy_id

The identification number of the proxy to list information for. The proxy_id is int, with a default of NULL. Either the 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 sysname, with a default of NULL. Either the id or the proxy_name may be specified.

[ @subsystem_id = ] subsystem_id

The identification number of the subsystem to list information for. The subsystem_id is int, with a default of NULL. Either the subsystem_id or the subsystem_name may be specified.

[ @subsystem_name = ] 'subsystem_name'

The name of the subsystem to list information for. The subsystem_name is sysname, with a default of NULL. Either the subsystem_id or the subsystem_name may be specified.

0 (success) or 1 (failure)

Column name

Data type

Description

subsystem_id

int

Subsystem identification number.

subsystem_name

sysname

The name of the subsystem.

proxy_id

int

Proxy identification number.

proxy_name

sysname

The name of the proxy.

When no parameters are provided, sp_enum_proxy_for_subsystem lists information about all proxies in the instance for every subsystem.

When a proxy id or proxy name is provided, sp_enum_proxy_for_subsystem lists subsystems that the proxy has access to. When a subsystem id or subsystem name is provided, sp_enum_proxy_for_subsystem lists proxies that have access to that subsystem.

When both proxy information and subsystem information is provided, the result set returns a row if the proxy specified has access to the subsystem specified.

This stored procedure is located in msdb.

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 proxies and subsystems for the current instance.

USE msdb ;
GO

EXEC dbo.sp_enum_proxy_for_subsystem ;
GO

B. Determining if a proxy has access to a specific subsystem

The following example returns a row if the proxy Catalog application proxy has access to the ActiveScripting subsystem. Otherwise, the example returns an empty result set.

USE msdb ;
GO

EXEC dbo.sp_enum_proxy_for_subsystem
    @subsystem_name = 'ActiveScripting',
    @proxy_name = 'Catalog application proxy' ;
GO
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft