SQL Server 2008 Service Broker tutorial — cannot receive the message (exception in transmission_status)

前端 未结 2 525
囚心锁ツ
囚心锁ツ 2020-12-08 15:39

I am learning how to use the Service Broker of SQL Server 2008 R2. When following the tutorial Completing a Conversation in a Single Database. Following the Lesson 1, I have

2条回答
  •  -上瘾入骨i
    2020-12-08 16:09

    You would need to grant receive on your target queue to your login. And it should work!

    USE [YourDatabase]
    GRANT RECEIVE ON [dbo].[YourTargetQueue]
    TO [Mycomp\Petr];
    GO
    

    And you also need to grant send for your user, permission on Target Service should be sufficient, but let's enable on both services for the future.

    USE AdventureWorks2008R2 ;
    GO
    
    GRANT SEND ON SERVICE::[//AWDB/1DBSample/InitiatorService]
    TO [Mycomp\Petr] ;
    GO
    
    GRANT SEND ON SERVICE::[//AWDB/1DBSample/TargetService]
    TO [Mycomp\Petr] ;
    GO
    

提交回复
热议问题