-- Tested with SQL Server 2005 9.00.852 -- Creates a queue that a service can send -- messages to. -- This is a Service Broker feature. USE DotNetFun GO CREATE PROC sp_DotNetFunQueueHandler AS -- Code that handles the messages in the queue... GO CREATE QUEUE DotNetFunQueue WITH STATUS = ON, RETENTION = ON, ACTIVATION ( STATUS = ON, PROCEDURE_NAME = DotNetFun..sp_DotNetFunQueueHandler, MAX_QUEUE_READERS = 5, EXECUTE AS SELF ) GO