Service Broker: Completing a Conversation Between Instances

The Microsoft Tutorial located here gives instructions on how to create a simple service broker solution between two databases on separate instances. The assumption of the tutorial is that you are working on two seperate servers. The purpose of this post is to document the changes that were necersary in order to get this working for two instances on the same server.

My Set Up

The default instance holds the target database.

The named instance holds the conversation instigator database.

Lesson 1:  Creating the Target Database

service_broker_across_instances_a .sql

expiry date of certificate

The example certificate has an expiry date of Dec 31st 2010, this date is in the past and no longer valid. I have changed this date to Dec 31st 2010

certificate backup location

The example uses C:\storedcerts\$ampleSSBCerts\InstTargetCertificate.cer as the location of the certificate back up. I have used the root of the c drive, C:\InstTargetCertificate.cer’;

Lesson 2:  Creating the Initiator Database

service_broker_across_instances 2a.sql

Initiator Endpoint Listener Port

The example uses 4022, I use 4023. I have 2 instances on this server, the target is using 4022 so I need to come up with something else, I went with 4023.

Expiry date of certificate

As before I needed to make tweaks to the certificate.

The example certificate has an expiry date of Dec 31st 2010, this date is in the past and no longer valid. I have changed this date to Dec 31st 2010

Certificate backup location

The example uses C:\storedcerts\$ampleSSBCerts\InstInitiatorCertificate.cer as the location of the certificate back up. I have used the root of the c drive, C:\InstInitiatorCertificate.cer’;

The example uses C:\storedcerts\$ampleSSBCerts\InstTargetCertificate.cer as the location of the certificate back up. I have used the root of the c drive, C:\InstTargetCertificate.cer’;

InstTargetRoute Address

The example uses  TCP://MyTargetComputer:4022, change this to TCP://localhost:4022

Lesson 3: Completing the Target Conversation Objects

service_broker_across_instances 3a.sql

Certificate backup location

The example uses C:\storedcerts\$ampleSSBCerts\InstInitiatorCertificate.cer as the location of the certificate back up. I have used the root of the c drive, C:\InstInitiatorCertificate.cer’;

InstInitiatorRoute

The example uses TCP://MyInitiatorComputer:4022 I have changed this to TCP://localhost:4023

No changes were made in lessons 4, 5 and 6

service_broker_across_instances 4a.sql

service_broker_across_instances 5a.sql

service_broker_across_instances 6a.sql

Advertisements

Tags: ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: