I am a newbie at SQL Service Broker so pardon my ignorance.
We have a SQL Service broker that needs to be enabled again after the database has restarted. How can we get to be automatically enabled after the sql service restart?
Also we are able to send messages when the broker is disabled and it throws no SQL error. We can search the queue and it has nothing (neither of the queues - see below).
Once we enable the broker all the messages appear on the queue. Is that a normal behavior or some missconfiguration.
See below for the configuration of the service broker.
Thank you,
Greg
ALTER DATABASE our_database SET ENABLE_BROKER WITH ROLLBACK IMMEDIATE
CREATE MESSAGE TYPE IncomingFileMessage
VALIDATION = NONE;
CREATE CONTRACT IncomingMessageContract
(IncomingFileMessage SENT BY ANY);
CREATE QUEUE ReceivingQueue
CREATE QUEUE IncomingMessageQueue
CREATE SERVICE ReceivingMessageService
ON QUEUE ReceivingQueue (IncomingMessageContract);
CREATE SERVICE IncomingMessageService
ON QUEUE IncomingMessageQueue (IncomingMessageContract);