How to Create a SQL Server 2005 Service Broker Endpoint

Posted Thursday, March 22, 2007 2:03 PM by C-Dog's .NET Tip of the Day

If you are trying to set up a SqlServerCacheDependency and don't have a DBA to do it for you, this may be on interest to you. One of the things required to do depdencies is to set up a service broker endpoint. There is nothing of course in the UI to do it, so here is the simplest possible T-SQL script that will get it done.

CREATE ENDPOINT BrokerEndpoint
STATE = STARTED
AS TCP ( LISTENER_PORT = 4037 )
FOR SERVICE_BROKER ( AUTHENTICATION = WINDOWS ) 

You can use the port of your choice and this thing actually has a ton of options. You can view them all at the link below.

CREATE ENDPOINT Options

Read the complete post at http://www.dotnettipoftheday.com/blog.aspx?id=342