Skip to content

Latest commit

 

History

History
78 lines (52 loc) · 4.27 KB

File metadata and controls

78 lines (52 loc) · 4.27 KB
title Delete a SQL Server Agent Proxy
description Delete a SQL Server Agent Proxy
author markingmyname
ms.author maghan
ms.date 01/19/2017
ms.service sql
ms.subservice ssms
ms.topic conceptual
helpviewer_keywords
deleting SQL Server Agent proxies
proxies [SQL Server Agent], deleting
removing SQL Server Agent proxies
monikerRange = azuresqldb-mi-current || >= sql-server-2016

Delete a SQL Server Agent Proxy

[!INCLUDE SQL Server SQL MI]

Important

On Azure SQL Managed Instance, most, but not all SQL Server Agent features are currently supported. See Azure SQL Managed Instance T-SQL differences from SQL Server for details.

This topic describes how to delete a [!INCLUDEssNoVersion] Agent proxy account in [!INCLUDEssnoversion] by using SQL Server Management Studio or [!INCLUDEtsql].

Before You Begin

Limitations and Restrictions

  • When you delete a [!INCLUDEssNoVersion] Agent proxy account, make sure the proxy does not reference any active job steps. To check for any job steps that reference the proxy, right-click the proxy, select Properties, and then, in the proxy_nameProxy Account Properties dialog box, select the References page. If you delete a proxy, you are given the option to reassign all job steps that use that proxy in the Delete Object dialog box.

  • [!INCLUDEssNoVersion] Agent proxies use credentials to store information about Windows user accounts. The user specified in the credential must have "Log on as a batch job" permission on the computer on which [!INCLUDEssNoVersion] is running.

  • [!INCLUDEssNoVersion] Agent checks subsystem access for a proxy and gives access to the proxy each time the job step runs. If the proxy no longer has access to the subsystem, the job step fails. Otherwise, [!INCLUDEssNoVersion] Agent impersonates the user that is specified in the proxy and runs the job step.

  • If the login for the user has access to the proxy, or the user belongs to any role with access to the proxy, the user can use the proxy in a job step.

Security

Permissions

Only members of the sysadmin fixed server role can create, modify, or delete proxy accounts.

Using SQL Server Management Studio

To delete a SQL Server Agent proxy account

  1. In Object Explorer, click the plus sign to expand a server that contains the proxy account that you want to delete.

  2. Click the plus sign to expand SQL Server Agent.

  3. Click the plus sign to expand the Proxies folder.

  4. Click the plus sign to expand the subsystem that contains the proxy account you want to delete (for example, ActiveX Script).

  5. Right-click the proxy account that you want to delete and select Delete.

  6. In the Delete Object dialog box, confirm that the correct proxy account is selected. Check the Reassign to check box to reassign the job steps that reference this proxy account to another account.

  7. Click OK.

Using Transact-SQL

To delete a SQL Server Agent proxy account

  1. In Object Explorer, connect to an instance of [!INCLUDEssDE].

  2. On the Standard bar, click New Query.

  3. Copy and paste the following example into the query window and click Execute.

    -- deletes the proxy "Catalog application proxy"  
    USE msdb ;  
    GO  
    EXEC dbo.sp_delete_proxy  
        @proxy_name = N'Catalog application proxy' ;  
    GO  
    

For more information, see sp_delete_proxy (Transact-SQL).