1

我制作了这个 Service Broker 应用程序:http: //pastebin.com/M1jZg2Pt

我想运行存储过程 spInsertLogLine 并在表 log_line 中结束记录。

我愿意

exec [broker].dbo.spSendLogLine
  @device_id = 'devid1',
  @application_name = 'appname1',
  @application_user_name = 'usrnme',
  @log_line_dt = 1, --@log_line_dt = GETDATE(), fails
  @log_line_message = 'this is the log line'

我最终在队列 qReceiveLogLine 中收到一条状态为 3 的消息,而队列 qInsertLogLine 或表 log_line 中没有任何内容。

我对 Service Broker 很陌生。我究竟做错了什么?

4

1 回答 1

2

spSendLogLine 变化中:

BEGIN DIALOG CONVERSATION @Handle
FROM SERVICE [sReceiveLogLine] 
TO SERVICE '[sInsertLogLine]'    
ON CONTRACT [cInsertLogLine]     
WITH ENCRYPTION = off;  

到:

BEGIN DIALOG CONVERSATION @Handle
FROM SERVICE [sReceiveLogLine] 
TO SERVICE 'sInsertLogLine'    
ON CONTRACT [cInsertLogLine]     
WITH ENCRYPTION = off;  
于 2013-02-19T12:16:04.050 回答