SQL Flow Field Guide

CREATE EVENT NOTIFICATION

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

defines event notification (no row flow)

What changes

Input
catalog
Output or change
catalog: event notification

Syntax at a glance

CREATE EVENT NOTIFICATION event_notification_name ON { SERVER | DATABASE | QUEUE queue_name } [ WITH FAN_IN ] FOR { event_type | event_group } [ , ...n ] TO SERVICE 'broker_service' , { 'broker_instance_specifier' | 'current database' } [ ; ]

Work example

A database or server event must be sent to a Service Broker service for review.

Choose the exact event group, target service, queue owner, and retention behavior before creating the notification.

Check your work A lab event reaches the intended service and unrelated events do not enter its queue.

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