Home Forums Programming Service Broker Execute long-running updates using Service Broker activation RE: Execute long-running updates using Service Broker activation

  • What I have done in the past is to have the broker request procedure write a request row to a separate table then send the ID of the row into the broker queue message. Long running or multi-stage transactions can be broken down into steps, having whatever process (or processes) performing the operations updating a status in that row after completion of each phase. That way you can close out the transaction from the activation procedure and keep it short which is what you need to do.

    If you can't (or don't want) to do your long running process that way you might consider turning off activation and just executing the activation procedure from and external process (multi-threaded or otherwise).

    The probability of survival is inversely proportional to the angle of arrival.