SQL Flow Field Guide

CREATE SERVICE

Catalog support for SQL Server 2022 (16.x) and 2025 (17.x)

defines service (no row flow)

What changes

Input
catalog
Output or change
catalog: service

Syntax at a glance

CREATE SERVICE service_name [ AUTHORIZATION owner_name ] ON QUEUE [ schema_name. ]queue_name [ ( contract_name | [DEFAULT][ ,...n ] ) ] [ ; ]

Work example

A Service Broker queue needs a service name and contract mapping.

Trace the service to its queue and list the contracts accepted by each conversation endpoint.

Check your work A lab dialog can target the service and its queue receives only contracted message types.

Open Microsoft Learn for full syntax, permissions, and details for your version.