BEGIN DIALOG CONVERSATION
opens a dialog
What changes
- Input
- initiator service, target service, contract
- Output or change
- conversation handle variable
Syntax at a glance
BEGIN DIALOG [ CONVERSATION ] @dialog_handle FROM SERVICE initiator_service_name TO SERVICE 'target_service_name' [ , { 'service_broker_guid' | 'CURRENT DATABASE' }] [ ON CONTRACT contract_name ] [ WITH [ { RELATED_CONVERSATION = related_conversation_handle | RELATED_CONVERSATION_GROUP = related_conversation_group_id } ] [ [ , ] LIFETIME = dialog_lifetime ] [ [ , ] ENCRYPTION = { ON | OFF } ] ] [ ; ]
Work example
An application needs a new reliable dialog between two broker services.
Review initiator, target, contract, broker instance, encryption, and end-of-dialog handling.
Check your work The lab dialog reaches the target service and each endpoint records its own handle.
Open Microsoft Learn for full syntax, permissions, and details for your version.