drop service

Description

The drop service command removes a user-defined Web service from the current database. Both the metadata and the corresponding stored procedure are removed.

Syntax

drop service service-name

Parameters

service-name

is the name for the user-defined Web service. This name can be any name that is valid for a stored procedure. If you specify the name of a service that does not exist, an exception results. Also, you cannot drop a service that is currently in use by another session.

Examples

Example 1

This example drops the user-defined Web service named sp_who_service:

drop service sp_who_service

Usage

You must undeploy a user-defined Web service before you can drop it.

Permissions

The permission checks for drop role differ based on your granular permissions settings.

Granular permissions enabled

With granular permissions enabled, you must be the service owner or a user with drop any procedure privilege.

Granular permissions disabled

With granular permissions disabled, you must be a user with sa_role.

See also

Commands create service

Stored procedures sp_webservices

Documentaiton Web Services Users Guide