|
|
ALTER ROUTE
Modify properties of a route.
Syntax
ALTER ROUTE route
WITH [SERVICE_NAME = 'service', ]
[BROKER_INSTANCE = 'broker_instance_identifier' , ]
[LIFETIME = route_lifetime , ]
ADDRESS = 'next_hop_address'
[, MIRROR_ADDRESS = 'next_hop_mirror_address' ] [; ]
Key:
route The route to create
owner Owner of the route
service The remote service that this route points to
must match the remote name exactly.
broker_instance The database that hosts the target service. (any)
route_lifetime Time, in seconds, to retain the route in the routing table. (Never)
address TCP://address:port
Service Broker does not remove expired routes from the routing table. An expired route can be made active with ALTER ROUTE.
Example
SELECT service_broker_guid
FROM sys.databases
WHERE database_id = DB_ID() ALTER ROUTE DemoRoute
WITH
SERVICE_NAME = '//ss64.com/Demo',
BROKER_INSTANCE = 'c4g576-12A3-5th2-g591-6289B56C1E735',
ADDRESS = 'TCP://192.168.10.2:1234' ;
"Get your kicks on ROUTE 66" - Jack Kerouac
Related commands:
CREATE ROUTE
DROP ROUTE
sys.routes - List routing table