Just two day ago, I wrote small note about SQL SERVER – Introduction to Service Broker.
Yesterday I wrote article where Service Broker throws error due to it is using same port as other application SQL Server – Fix – Error : 9692 The _MSG protocol transport cannot listen on port because it is in use by another process. One of the option was to configure Service Broker to different port than other application is using. I got couple of request to write how to do it.
I am writing two script where first End Point is created with specific port and required authentication and another script where End Point is dropped. This way Service Broker can be configured on different port.
Script 1: Create Service Broker End Point
CREATE ENDPOINT BrokerEndpoint
STATE = STARTED
AS TCP ( LISTENER_PORT = 5000)
FOR SERVICE_BROKER ( AUTHENTICATION = WINDOWS ) ;
Script 2 : Drop Service Broker End Point
If any user know how to just change the port without creating and dropping Service Broker End Point, please suggest your method.
USE master ;
DROP ENDPOINT BrokerEndpoint ;