Skip to content
Advertisement

ServiceBroker : Stored procedure working as stand-alone but not as trigger

We are trying to launch webservices asynchronously from SQL Server and Service Broker seemed the most interesting choice.

For Service Broker itself many different examples can be found online. I managed to have a working example in which I sent several parameters in a message on a queue and have the queue trigger automatically when a message arrives on it. The problem is that the code works fine when I just save the information to another table but it fails when I try to call a webservice. It then has the effect of stopping the queue.
It still works when I run the stored procedure by itself but not as a trigger on the queue. Does anyone have an idea of what I am doing wrong please?

My Stored Procedure for getting the message from the queue is as follows :

Thanks and best regards,

Advertisement

Answer

Seems our issue is resolved ; Had to set “SET TRUSTWORTHY ON ” in the database were the servicebroker is running.

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement