2009
09.03

I’ve been having this issue for quite a while now, and i just solved it recently.

Basically, I have database A with service broker queues, and hosts an activation sproc. The sproc in A dynamically creates an insert TSQL and runs it on Database B.

Both databases are owned by the same username, which has super-user db privileges. A.sproc fails inserting records to B with the error. I tried a lot of magic and several flavors of EXECUTE AS statement to no avail. Upon seeing this KB article, it turns out that all i need to do is:

ALTER DATABASE A SET TRUSTWORTHY ON

And Voila! problem gone.

Very annoying to say the least…but it kind of makes sense. I just wished that the error messages (just like all Microsoft error messages for that matter) could be less cryptic.

No Comment.

Add Your Comment

Spam Protection by WP-SpamFree