sp_revoke_proxy_from_subsystem (Transact-SQL)

 

THIS TOPIC APPLIES TO:yesSQL Server (starting with 2008)noAzure SQL DatabasenoAzure SQL Data Warehouse noParallel Data Warehouse

Revokes access to a subsystem from a proxy.

Topic link icon Transact-SQL Syntax Conventions

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

[ @proxy_id = ] id
The proxy identification number of the proxy to revoke access from. The proxy_id is int, with a default of NULL. Either proxy_id or proxy_name must be specified, but both cannot be specified.

[ @proxy_name = ] 'proxy_name'
The name of the proxy to revoke access from. The proxy_name is sysname, with a default of NULL. Either proxy_id or proxy_name must be specified, but both cannot be specified.

[ @subsystem_id = ] id
The id number of the subsystem to revoke access to. The subsystem_id is int, with a default of NULL. Either subsystem_id or subsystem_name must be specified, but both cannot be specified. The following table lists the values for each subsystem.

ValueDescription
2ActiveX Script

 ** Important ** The ActiveX Scripting subsystem will be removed from SQL Server Agent in a future version of MicrosoftSQL Server. Avoid using this feature in new development work, and plan to modify applications that currently use this feature.
3Operating System (CmdExec)
4Replication Snapshot Agent
5Replication Log Reader Agent
6Replication Distribution Agent
7Replication Merge Agent
8Replication Queue Reader Agent
9Analysis Services Command
10Analysis Services Query
11SSIS package execution
12PowerShell Script

[ @subsystem_name= ] 'subsystem_name'
The name of the subsystem to revoke access to. The subsystem_name is sysname, with a default of NULL. Either subsystem_id or subsystem_name must be specified, but both cannot be specified. The following table lists the values for each subsystem.

ValueDescription
ActiveScriptingActiveX Script
CmdExecOperating System (CmdExec)
SnapshotReplication Snapshot Agent
LogReaderReplication Log Reader Agent
DistributionReplication Distribution Agent
MergeReplication Merge Agent
QueueReaderReplication Queue Reader Agent
ANALYSISQUERYAnalysis Services Command
ANALYSISCOMMANDAnalysis Services Query
DtsSSIS package execution
PowerShellPowerShell Script

Revoking access to a subsystem does not change the permissions for the principal specified in the proxy.

System_CAPS_ICON_note.jpg Note


To determine which job steps reference a proxy, right-click the Proxies node under SQL Server Agent in Microsoft SQL Server Management Studio, and then click Properties. In the Proxy Account Properties dialog box, select the References page to view all job steps that reference this proxy.

Only members of the sysadmin fixed server role can execute sp_revoke_proxy_from_subsystem.

The following example revokes access to the SSIS subsystem for the proxy Catalog application proxy.

USE msdb ;  
GO  
  
EXEC dbo.sp_revoke_proxy_from_subsystem  
    @proxy_name = 'Catalog application proxy',  
    @subsystem_name = N'Dts';  

SQL Server Agent Stored Procedures (Transact-SQL)
Implement SQL Server Agent Security
sp_grant_proxy_to_subsystem (Transact-SQL)

Community Additions

ADD
Show: