| title | DROP CONTRACT (Transact-SQL) | Microsoft Docs | |||||
|---|---|---|---|---|---|---|
| ms.custom | ||||||
| ms.date | 03/06/2017 | |||||
| ms.prod | sql | |||||
| ms.prod_service | sql-database | |||||
| ms.component | t-sql|statements | |||||
| ms.reviewer | ||||||
| ms.suite | sql | |||||
| ms.technology | t-sql | |||||
| ms.tgt_pltfrm | ||||||
| ms.topic | language-reference | |||||
| f1_keywords |
|
|||||
| dev_langs |
|
|||||
| helpviewer_keywords |
|
|||||
| ms.assetid | fdd0f81e-3c22-4cdf-9416-b4977a6ac3b6 | |||||
| caps.latest.revision | 29 | |||||
| author | barbkess | |||||
| ms.author | barbkess | |||||
| manager | craigg |
[!INCLUDEtsql-appliesto-ss2008-xxxx-xxxx-xxx-md]
Drops an existing contract from a database.
Transact-SQL Syntax Conventions
DROP CONTRACT contract_name
[ ; ]
contract_name
The name of the contract to drop. Server, database, and schema names cannot be specified.
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.
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.
The following example removes the contract //Adventure-Works.com/Expenses/ExpenseSubmission from the database.
DROP CONTRACT
[//Adventure-Works.com/Expenses/ExpenseSubmission] ;
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)