GRANT Service Broker Permissions
GRANT permissions on service broker
What changes
- Input
- principal and securable names
- Output or change
- permission metadata
Syntax at a glance
GRANT permission [ ,...n ] ON { [ CONTRACT :: contract_name ] | [ MESSAGE TYPE :: message_type_name ] | [ REMOTE SERVICE BINDING :: remote_binding_name ] | [ ROUTE :: route_name ] | [ SERVICE :: service_name ] } TO database_principal [ ,...n ] [ WITH GRANT OPTION ] [ AS granting_principal ]
Work example
A message handler needs permission on a Service Broker securable.
Trace the handler to its service, queue, contract, and execution context before granting access.
Check your work The handler completes its message task and cannot administer unrelated broker objects.
Open Microsoft Learn for full syntax, permissions, and details for your version.