Events
Mar 31, 11 PM - Apr 2, 11 PM
The biggest SQL, Fabric and Power BI learning event. March 31 – April 2. Use code FABINSIDER to save $400.
Register todayThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Applies to:
SQL Server
Azure SQL Managed Instance
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, Service Broker 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)
Events
Mar 31, 11 PM - Apr 2, 11 PM
The biggest SQL, Fabric and Power BI learning event. March 31 – April 2. Use code FABINSIDER to save $400.
Register today