Edit

Share via


How to: Activate Service Broker networking (Transact-SQL)

Applies to: SQL Server Azure SQL Managed Instance

Service Broker doesn't send or receive messages over the network by default. To activate Service Broker networking in an instance, create an endpoint for Service Broker.

Creating a Service Broker endpoint causes SQL Server to accept TCP/IP connections on the port specified. Service Broker transport security allows you to require authorization for connections to the port. If the computer that runs SQL Server has a firewall enabled, the firewall configuration on that computer must allow both incoming connections for the port specified in the endpoint. For more information on Service Broker transport security, see Service Broker transport security.

Activate Service Broker networking

Create a Service Broker endpoint, specifying the port number and the authentication level.

Examples

USE master;
GO

CREATE ENDPOINT BrokerEndpoint
    STATE = STARTED
    AS TCP (
        LISTENER_PORT = 4037
    )
    FOR SERVICE_BROKER (
        AUTHENTICATION = WINDOWS
    );
GO