Change the port for sql server service broker

17 July,2013 by Jack Vamvas

SQL Server Service Broker by default uses port TCP 4022. For security policy reasons I prefer to use a different port number.

Before deciding on a port number check it won’t conflict with another application port usage. Use netstat to view all ports currently open . Read How to Configure static ports for SQL Server  for more details

Once you’ve decided on a port number – use these scripts to create the service broker endpoint and assign the listener port

--create ENDPOINT
USE master;
GO
CREATE ENDPOINT SqlBrokerEndpoint
STATE = STARTED
AS TCP ( LISTENER_PORT = 45000)
FOR SERVICE_BROKER ( AUTHENTICATION = WINDOWS ) ;
GO 

--To verify the ENDPOINT is created use: 

SELECT name, protocol_desc, port, state_desc FROM sys.tcp_endpoints WHERE type_desc = 'SERVICE_BROKER'

--To DROP the SQL Server Service Endpoint

USE master ;
GO
DROP ENDPOINT SqlBrokerEndpoint
GO 


--To ALTER the ENDPOINT 

ALTER ENDPOINT SqlBrokerEndpoint
AS TCP (LISTENER_PORT = 46000);


 Read more

Troubleshooting SQL Server Service Broker

netstat monitoring and tuning performance - SQL Server DBA

Routing OSPF and Network Team - SQL Server DBA

SQL Performance tuning - Drilling into the problem - SQL Server DBA

 


Author: Jack Vamvas (http://www.sqlserver-dba.com)


Share:

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment on Change the port for sql server service broker


sqlserver-dba.com | SQL Server Performance Tuning | SQL Server DBA:Everything | FAQ | Contact|Copyright & Disclaimer