<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>SQL Server with Mr. Denny &#187; Route</title>
	<atom:link href="http://itknowledgeexchange.techtarget.com/sql-server/tag/route/feed/" rel="self" type="application/rss+xml" />
	<link>http://itknowledgeexchange.techtarget.com/sql-server</link>
	<description></description>
	<lastBuildDate>Mon, 10 Jun 2013 17:25:32 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Back To Basics: Service Broker Routes</title>
		<link>http://itknowledgeexchange.techtarget.com/sql-server/back-to-basics-service-broker-routes/</link>
		<comments>http://itknowledgeexchange.techtarget.com/sql-server/back-to-basics-service-broker-routes/#comments</comments>
		<pubDate>Thu, 19 Jun 2008 11:00:41 +0000</pubDate>
		<dc:creator>Denny Cherry</dc:creator>
				<category><![CDATA[Back To Basics]]></category>
		<category><![CDATA[Route]]></category>
		<category><![CDATA[Service Broker]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/sql-server/back-to-basics-service-broker-routes/</guid>
		<description><![CDATA[Routes are only needed when sending service broker messages from one server to another.  They define the SQL Server and TCP Port which the sending SQL Server will connect to in order to deliver the message.  If you are sending the message to a mirrored database, then you can specify the mirror as well as [...]]]></description>
				<content:encoded><![CDATA[<p>Routes are only needed when sending service broker messages from one server to another.  They define the SQL Server and TCP Port which the sending SQL Server will connect to in order to deliver the message.  If you are sending the message to a mirrored database, then you can specify the mirror as well as the primary database.</p>
<p>If you needed to you could setup three or more servers in a chain and have them forward the messages from one server to another.  This would be handy if you needed to get messages through firewalls and the source and destination servers were not permitted to talk to each other.  The only requirement to do this is that one server in each conversation must be a paid for edition of SQL Server.  In other words two SQL Express instances can not send messages to each other directly.  Those messages much be forwarded through a Workgroup, Standard, or Enterprise instance.</p>
<p>Before you can create a Service Broker Route, you have to have an endpoint on the remote machine.  For this purpose we&#8217;ll assume that the Service Broker endpoint was created on port 1234.  Our local server is SQL1 and the remote machine will be SQL2.  The only other piece of information that you need to know is the Service Broker Instance GUID from SQL2.  This is found in the service_broker_guid column of the sys.databases DMV on server2 (fifth column from the right in SQL 2005).  If the GUID is all 0s then you need to enable the service broker by using the ALTER DATABASE Command.</p>
<p>The CREATE ROUTE syntax is very easy.</p>
<p><code>CREATE ROUTE RouteName<br />
WITH SERVICE_NAME = 'ServiceName',<br />
BROKER_INSTANCE = 'ae8505fa-b84d-4503-b91f-3252825ccf09', /*Use your GUID here*/<br />
ADDRESS='TCP://SQL2:1234'</code></p>
<p>If your target is using database mirroring set the MIRROR_ADDRESS to the name and port number of the mirror.  This way in the event of a fail over the sending server can continue to deliver messages.</p>
<p>If you need the route to expire on a specific date, for example you are sending data to a partner and you want to automatically stop sending them the messages when the contract ends, add the LIFETIME parameter with the number of seconds until the route expires.  If the LIFETIME is omitted the route will never expire.</p>
<p>Denny</p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/sql-server/back-to-basics-service-broker-routes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Back To Basics: Service Broker Services</title>
		<link>http://itknowledgeexchange.techtarget.com/sql-server/back-to-basics-service-broker-services/</link>
		<comments>http://itknowledgeexchange.techtarget.com/sql-server/back-to-basics-service-broker-services/#comments</comments>
		<pubDate>Mon, 16 Jun 2008 11:00:49 +0000</pubDate>
		<dc:creator>Denny Cherry</dc:creator>
				<category><![CDATA[Back To Basics]]></category>
		<category><![CDATA[Route]]></category>
		<category><![CDATA[Service]]></category>
		<category><![CDATA[Service Broker]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/sql-server/back-to-basics-service-broker-services/</guid>
		<description><![CDATA[Services are used to bind contracts to queues.  They are also used to database to database, or server to server routing of messages via routes (we&#8217;ll talk about them later).  Unlike most other objects within SQL Server, the name of the service is case sensitive, no matter what collation you have set for your database.  [...]]]></description>
				<content:encoded><![CDATA[<p>Services are used to bind contracts to queues.  They are also used to database to database, or server to server routing of messages via routes (we&#8217;ll talk about them later).  Unlike most other objects within SQL Server, the name of the service is case sensitive, no matter what collation you have set for your database.  When using server to server queueing the service names must be identical, including case as SQL Servers uses a hash of the service name to locate the correct service.</p>
<p>(Service names are not actually case sensitive if you arne&#8217;t using routing, but if you are going to start routing the messages later it&#8217;s better to start off getting them in the correct case.)</p>
<p>The syntax to create the service is pretty straight forward.</p>
<p><code>CREATE SERVICE ServiceName<br />
ON QUEUE QueueName (ContractName)</code></p>
<p>If the service will only be the initiator then the contract name can be omited if preferred.  If you want to create a multi-user contact you can specify additional contracts by simply making a comma seperated list of contract names.</p>
<p><code>CREATE SERVICE ServiceName<br />
ON QUEUE QueueName;</code></p>
<p><code>CREATE SERVICE ServiceName<br />
ON QUEUE QueueName (ContractName1, ContractName2);</code></p>
<p>Denny</p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/sql-server/back-to-basics-service-broker-services/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
