Megosztás a következőn keresztül:


Completing a Conversation Between Instances

This tutorial is intended for users who are new to Service Broker, but are familiar with database concepts and Transact-SQL statements. It will help new users get started by showing them how to build and run a simple conversation between two databases on separate instances of the Database Engine.

What You Will Learn

This tutorial builds on the tasks that you learned in Completing a Conversation Between Databases. In this tutorial, you will learn how to configure a conversation so that it runs between two instances of the Database Engine.

The steps that you will follow in this tutorial are the same as those you followed in the Completing a Conversation Between Databases tutorial, with these exceptions:

  • The two databases will be on separate instances of the Database Engine.

  • You will learn how to create Service Broker endpoints and routes to establish network connections between two instances.

  • The previous tutorials did not transmit messages on the network. Therefore, they used Database Engine permissions to help protect against unauthorized access to messages. In Lesson 3, you will learn how to create certificates and remote service bindings to encrypt messages on the network.

In this tutorial, the instance of the Database Engine that contains the initiator database is referred to as the initiator instance. The instance that contains the target database is referred to as the target instance.

This tutorial is divided into six lessons:

Requirements

To complete this tutorial, you should be familiar with the Transact-SQL language and how to use the Database Engine Query Editor in SQL Server Management Studio.

You must have two instances of the Database Engine installed. If the two instances are on separate computers, always connect to each instance from a copy of Management Studio on the same computer. For example, do not connect to the initiator instance from a copy of Management Studio on the target computer.

You must have a single login authorized in both instances. In both instances, the login must be either a member of the sysadmin fixed server role, or have the following permissions to run this tutorial:

  • ALTER ANY LINKED SERVER.

  • CREATE ENDPOINT.

  • At least one of the CREATE DATABASE, CREATE ANY DATABASE, or ALTER ANY DATABASE permissions.

Both instances of the Database Engine must be running under a Windows account that is a valid login in the other instance.

Both systems must have the following installed:

  • Any edition of SQL Server 2005 or SQL Server 2008, but only one of the instances can be SQL Server Express Edition.

  • Either SQL Server Management Studio or Management Studio Express.

  • Internet Explorer 6 or a later version.

The firewalls for both systems must be configured to enable connections to UDP port 1434 and TCP ports 1433 and 4022. Use the Configuration Manager tool to ensure that both instances allow TCP/IP connections, and that the SQL Server Browser service is running on both computers.

Note

When you review the tutorials, we recommend that you add the Next and Previous buttons to the document viewer toolbar. For more information, see Adding Next and Previous Buttons to Help.