none
Unable to reach Target Service issues after receiving message

    Question

  • Hello everyone,

    I am working on a demo for my devs/dba at work regarding the use of service broker, why we should start using it, and other fun facts that just go above initial implementation.  Part of this demo includes the routing capabilities for cross instance conversations. 

    The good news is that I get messages to from Instance A to Instance B.  The issue I am having is after receiving the message on Instance B, I send a response back, and that is failing.  For the life of me, I cannot figure out why.  The error I am receiving is:

    "The target service name could not be found. Ensure that the service name is specified correctly and/or the routing information has been supplied."

    In doing research on Google/Bing/Yahoo/Various Forums, the consensus seems to be that this is usually an issue with either A) Remote Service Binding or B) Case Sensitivity when specifying the server.  Maybe I have been looking at this code to long, but I cannot find an issue with either of these as I currently understand them.  So, I am looking for help.

    Here are the full scripts that I am running.  Please note that these scripts are not configured to run all the way through, but in blocks.  I apologize for this in advance.

    ServerA Script:
    https://onedrive.live.com/redir?resid=ED3BB9E286990092!250&authkey=!AHr6nNdQgxnCYiQ&ithint=file%2ctxt

    ServerB Script:
    https://onedrive.live.com/redir?resid=ED3BB9E286990092!249&authkey=!AB_TXg0S2Rgwa38&ithint=file%2ctxt

    I am using a VM, where I have installed 2 instance of SQL Server 2012 Developer Ed, SP2, CU1.  Instance1 is call ServerA.  Instace2 is called Server2. 

    Thank you very much for any assistance you are able to provide. 

    Sincerely,

    Nathan Heaivilin


    Saturday, August 09, 2014 12:06 AM

Answers

  • This might be the culprit:

    CREATE ROUTE RouteFromBToA
    WITH SERVICE_NAME = N'BrokerDemoSenderServiceSeverA'   -- Name of Service on

    There is an r missing in "Server".

    The page on OneDrive has an interesting feature that helped me to find this. I noticed that if I clicked on a word, all occurrences of that word were highlighted. When this did not happen with the service name, something seemed fishy. But I had to copy the names to a text window and put them above each other to see the issue:

    BrokerDemoSenderServiceServerA
    BrokerDemoSenderServiceSeverA


    Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
    Saturday, August 09, 2014 8:08 AM

All replies

  • This might be the culprit:

    CREATE ROUTE RouteFromBToA
    WITH SERVICE_NAME = N'BrokerDemoSenderServiceSeverA'   -- Name of Service on

    There is an r missing in "Server".

    The page on OneDrive has an interesting feature that helped me to find this. I noticed that if I clicked on a word, all occurrences of that word were highlighted. When this did not happen with the service name, something seemed fishy. But I had to copy the names to a text window and put them above each other to see the issue:

    BrokerDemoSenderServiceServerA
    BrokerDemoSenderServiceSeverA


    Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
    Saturday, August 09, 2014 8:08 AM
  • Erland,

    Thank you very much for the assistance.  Hate it when it is so simple that I keep overlooking it.  That fixed the issue.

    Nathan

    Sunday, August 10, 2014 4:28 AM
  • That happens to us all. More than once, I have played with something new, and it hasn't worked. I have been thinking that I've misunderstood something, but in the end it was just a silly typo or similar.


    Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
    Sunday, August 10, 2014 9:18 AM