Udostępnij za pośrednictwem


DROP ROUTE (Transact-SQL)

Drops a route, deleting the information for the route from the routing table of the current database.

Syntax

DROP ROUTE route_name
[ ; ]

Arguments

  • route_name
    The name of the route to drop. Server, database, and schema names cannot be specified.

Remarks

The routing table that stores the routes is a metadata table that can be read through the catalog view sys.routes. The routing table can only be updated through the CREATE ROUTE, ALTER ROUTE, and DROP ROUTE statements.

You may drop a route regardless of whether any conversations use the route. However, if there is no other route to the remote service, messages for those conversations will remain in the transmission queue until a route to the remote service is created or the conversation times out.

Permissions

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

Examples

A. Dropping a route

Deletes the ExpenseRoute route.

DROP ROUTE ExpenseRoute ;

See Also

Reference

ALTER ROUTE (Transact-SQL)
CREATE ROUTE (Transact-SQL)
EVENTDATA (Transact-SQL)
sys.routes (Transact-SQL)

Other Resources

Service Broker Routing

Help and Information

Getting SQL Server 2005 Assistance