Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 283519
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T05:22:49+00:00 2026-05-12T05:22:49+00:00

I’m configuring a simple service broker implementation. Locally, we use SQL Server 2008 Express

  • 0

I’m configuring a simple service broker implementation. Locally, we use SQL Server 2008 Express and everything works fine. Once the code runs on our production server (SQL SERVER 2005), messages are stuck in the receiver queue. The followind code is incomplete but states how queues and services are basically configured:

-- Create message type to validate the content of a message
CREATE MESSAGE TYPE MyMessageType VALIDATION = NONE;

-- Create contract to validate what direction messages can be sent in a conversation.
CREATE CONTRACT MyContract 
(
    MyMessageType SENT BY INITIATOR
) 

-- The receiver queue will process each message using the 'spProcessMessage' stored procedure
CREATE QUEUE [MyReceiverQueue];
ALTER QUEUE [MyReceiverQueue] WITH ACTIVATION 
(
      STATUS = ON,
      MAX_QUEUE_READERS = 1,
      PROCEDURE_NAME = spProcessMessage,
      EXECUTE AS SELF
);

-- The receiver service processes the incoming messages and passes them to the ReceiverQueue.
CREATE SERVICE [MyReceiverService] ON QUEUE [MyReceiverQueue]([MyContract]);

-- Queue and service to send the message from
CREATE QUEUE [MySenderQueue];
CREATE SERVICE [MySenderService] ON QUEUE [MySenderQueue];

Once the service is installed, a message is fired this way:

-- Send a message to the receiver queue
DECLARE @MessageBody XML
SET @MessageBody = ''; 
DECLARE @Handle UNIQUEIDENTIFIER;
BEGIN DIALOG CONVERSATION @Handle
FROM SERVICE [MySenderService]
TO SERVICE 'MyReceiverQueue'
ON CONTRACT [MyContract]
WITH ENCRYPTION = OFF;
SEND ON CONVERSATION @Handle 
MESSAGE TYPE [MyMessageType](@MessageBody);

All message are stuck in the ‘MyReceiverQueue’. If I execute manually ‘spProcessMessage’, messages are processed normally.

A few more details:
– sys.transmission_queue is empty
– sys.conversation_endpoints state that both service are ‘CONVERSING’
– Broker is enabled and DB is configured as SQL 2005 compatible

Any ideas why those messages aren’t processed automatically?

Thanks a lot for your time.

—

OK, after playing around for a bit I got ssbdiagnose working. As Remus commentented, it is located here: C:\Program Files\Microsoft SQL Server\100\Tools\Binn. I made it work locally this way:

ssbdiagnose -E -S "JDECUPER\SQLEXPRESS" -d mydb CONFIGURATION FROM SERVICE MySenderService TO SERVICE MyReceiverService ON CONTRACT MyContract

Then, I tried it on our production server:

ssbdiagnose -XML -U loginID -P pwd -S "machine's IP" -d mydb CONFIGURATION FROM SERVICE MySenderService TO SERVICE MyReceiverService ON CONTRACT MyContract > C:\testBrokerService.xml

First error detected:

Service Broker GUID is identical to that of database Pandilla on server 200.57.141.193

Another database on the server had an identical GUID for the service broker. I only had to regenerate the GUID:

ALTER DATABASE [myotherdb] SET NEW_BROKER;

The second error had to do with the user’s permissions to execute the stored procedure:

The EXECUTE AS for the user dbo specified for activation on queue dbo.AlbumGanadoresQueue cannot be impersonated due to an exception

After upgrading those permissions, everything started to work correctly.

Many thanks to Remus for me pointing into the right direction. I was a bit long but I hope the details will help other developers.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T05:22:50+00:00Added an answer on May 12, 2026 at 5:22 am

    First thing read up the Troubleshooting Dialogs guide on my site and follow the step by step until you find the possible issue.
    Second, if you have access to a SQL 2008 deployment, run the ssbdiagnose tool from it. Although is part of SQL 2008, is perfectly capable of diagnosing SQL 2005 as well. This is the preferred method, again, if you have access to a SQL 2k8 deployment.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 449k
  • Answers 449k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer I'm going to answer this as if you're asking for… May 15, 2026 at 8:19 pm
  • Editorial Team
    Editorial Team added an answer find() >>> s = "the dude is a cool dude"… May 15, 2026 at 8:19 pm
  • Editorial Team
    Editorial Team added an answer ProfK - i use the datepicker inside a shared EditorTemplate… May 15, 2026 at 8:19 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.