views:

32

answers:

1

I've implemented a messaging system over SQL Server Service Broker. It is working great, with the sole exception that every once in a while (maybe once per week per server) my initiator service just vanishes without a trace. The corresponding queue is still there, but the service is missing.

Obviously this causes problems in my system. It's a simple matter to recreate the service by hand, but I'm confused as to what might cause this behavior. I understand that automatic poison message handling causes queues to be disabled, but I don't see anything that indicates services can be disabled or deleted automatically.

When this happens, I usually have a large backlog of messages in multiple application queues, but nothing extreme. Total message backlog is around 200,000.

Does anyone know what might be happening here?

+2  A: 

You must have a bug of some sort that issues a DROP SERVICE statement. That is the only way a service gets deleted.

Check the default trace, the DROP statement gets traced and saved into it so you can track down the application/user/statement that issues the DROP. Check sys.traces to find the location of the default trace then open the .TRC file in Profiler.

Remus Rusanu
Thanks, Remus. I do have code that drops and recreates queues and services during our maintenance cycle; I'll focus on figuring out what's going on there. Thanks for the tip on the default trace flag; I had not known about that before!
mwigdahl