Skip to content

Latest commit

 

History

History
65 lines (51 loc) · 2.46 KB

drop-contract-transact-sql.md

File metadata and controls

65 lines (51 loc) · 2.46 KB
title description author ms.author ms.date ms.service ms.subservice ms.topic f1_keywords helpviewer_keywords dev_langs
DROP CONTRACT (Transact-SQL)
DROP CONTRACT (Transact-SQL)
markingmyname
maghan
03/06/2017
sql
t-sql
reference
DROP_CONTRACT_TSQL
DROP CONTRACT
dropping contracts
removing contracts
deleting contracts
contracts [Service Broker], dropping
DROP CONTRACT statement
TSQL

DROP CONTRACT (Transact-SQL)

[!INCLUDE SQL Server]

Drops an existing contract from a database.

:::image type="icon" source="../../includes/media/topic-link-icon.svg" border="false"::: Transact-SQL syntax conventions

Syntax

DROP CONTRACT contract_name   
[ ; ]  

[!INCLUDEsql-server-tsql-previous-offline-documentation]

Arguments

contract_name
The name of the contract to drop. Server, database, and schema names cannot be specified.

Remarks

You cannot drop a contract if any services or conversation priorities refer to the contract.

When you drop a contract, [!INCLUDEssSB] ends any existing conversations that use the contract with an error.

Permissions

Permission for dropping a contract defaults to the owner of the contract, members of the db_ddladmin or db_owner fixed database roles, and members of the sysadmin fixed server role.

Examples

The following example removes the contract //Adventure-Works.com/Expenses/ExpenseSubmission from the database.

DROP CONTRACT [//Adventure-Works.com/Expenses/ExpenseSubmission] ;  

See Also

ALTER BROKER PRIORITY (Transact-SQL)
ALTER SERVICE (Transact-SQL)
CREATE CONTRACT (Transact-SQL)
DROP BROKER PRIORITY (Transact-SQL)
DROP SERVICE (Transact-SQL)
EVENTDATA (Transact-SQL)