I have a service broker which calls a stores procedure sp_dequeue
( STATUS = ON,
MAX_QUEUE_READERS = 1,
PROCEDURE_NAME = sp_dequeue,
EXECUTE AS 'Username'
In my sp_dequeue i am inserting record in to Linked server...
So when i am calling sp_dequeue from the magmnt studio it works fine. But when its called automatically via service broker i get this error msg :
"Access to the remote server is denied because the current security context is not trusted.".
In my linked server property i have checked "Be made using this security constraint" and provided oracle userid and pwd also i have added 'Username' mapping to oracle server.(Both username and pwd of oracle/SQL are different)
I googled for this error tried mostly all combination.
Pls do help me in sloving this problem.
using Sql server 2005 and oracle 10g