Service Broker Cross DB function

58 views Asked by At

I have the following setup: I have a Service Broker on database "DB_A". I call the stored proc (SP_ADDINTOBROKER) which adds a new line in the pipe. Parallel to adding a line in the pipe another stored proc is called to retrieve the value (SP_GETFROMBROKER).

In this stored proc I call a function which retrieves a value from "DB_B".

So I execute the main stored proc (SP_ADDINTOBROKER) which calls SP_GETFROMBROKER. In SP_GETFROMBROKER i call a function which calls DB_B. I get the following error:

The server principal "xxxxxx" is not able to access the database "DB_B" under the current security context.

xxxxxx is the user defined in the Broker Queue. xxxxxx is a windows user aswell.

From what I've read this seems to be a cross DB issue. Anyone has an idea?

Best regards, Jeppen

0

There are 0 answers