| title | DROP SERVICE (Transact-SQL) | Microsoft Docs | |||||
|---|---|---|---|---|---|---|
| ms.custom | ||||||
| ms.date | 03/06/2017 | |||||
| ms.prod | sql | |||||
| ms.prod_service | sql-database | |||||
| ms.service | ||||||
| ms.component | t-sql|statements | |||||
| ms.reviewer | ||||||
| ms.suite | sql | |||||
| ms.technology |
|
|||||
| ms.tgt_pltfrm | ||||||
| ms.topic | language-reference | |||||
| f1_keywords |
|
|||||
| dev_langs |
|
|||||
| helpviewer_keywords |
|
|||||
| ms.assetid | 2351bba7-0f2a-4cda-b3b2-6a88b8747c53 | |||||
| caps.latest.revision | 36 | |||||
| author | edmacauley | |||||
| ms.author | edmaca | |||||
| manager | craigg | |||||
| ms.workload | Inactive |
[!INCLUDEtsql-appliesto-ss2008-xxxx-xxxx-xxx-md]
Drops an existing service.
Transact-SQL Syntax Conventions
DROP SERVICE service_name
[ ; ]
service_name
The name of the service to drop. Server, database, and schema names cannot be specified.
You cannot drop a service if any conversation priorities refer to it.
Dropping a service deletes all messages for the service from the queue that the service uses. [!INCLUDEssSB] sends an error to the remote side of any open conversations that use the service.
Permission for dropping a service defaults to the owner of the service, members of the db_ddladmin or db_owner fixed database roles, and members of the sysadmin fixed server role.
The following example drops the service //Adventure-Works.com/Expenses.
DROP SERVICE [//Adventure-Works.com/Expenses] ;
ALTER BROKER PRIORITY (Transact-SQL)
ALTER SERVICE (Transact-SQL)
CREATE SERVICE (Transact-SQL)
DROP BROKER PRIORITY (Transact-SQL)
EVENTDATA (Transact-SQL)