Search code examples
sql-servercertificateservice-brokerendpoints

Service Broker, endpoint - do i really need a certificate to send message between two servers?


Do I really need to create a certificate to send a queued message between sql servers? Can I use dbo authentication for the endpoint on both servers?

create endpoint target
state = started
as TCP
(
LISTENER_PORT = 4022
)
FOR SERVICE_BROKER (AUTHENTICATION = CERTIFICATE ????, ENCRYPTION = ENABLED);

IF I have to use a certificate, can I use a User database certificate instead of one on master? How would I go about doing this?

I am not concerned with security at the moment. Both servers are on a closed lan, with no internet access.


Sorry.I do not have profiler. I am using sql express 2005.

  CREATE ROUTE RoutetoTarget
    WITH
    BROKER_INSTANCE = 'xxxxxx-xxx-xx-x-x-x-x',
   SERVICE_NAME = 'LOCALReceivingService',

<---that works only in instances on same server. However once I add the target server IP with port number (the endpoint I created on target server) messages get sent into the void. They never make it to the other server.

ADDRESS = 'TCP://targetipadress:PORT'

Solution

  • I figured it out. You need to at least have AUTHORIZATION DBO for both local and remote service, make sure all encryption in endpoint, and sent message is off/disabled, and lastly, DO NOT have a master key. Many online sites say Broker will not work without an encrypted master key, but doesn't seem to be true in this case.