Share via


Cannot find the remote service GUID it does not exist

Question

Monday, March 17, 2008 11:35 PM

Hello,

I have troublesome problem with service broker. I move a lot of databases
from one server to another servers (by backup and restore) but always have problem with
databases where service broker is enabled. Bellow is my scenario:

  1. backup database db1 (srv1)
  2. restore db1 (srv2, srv3, srv4.....)
  3. drop manually Services and Queues, only green filed
    (http://img122.imageshack.us/img122/549/clipqk5.jpg) (srv2, srv3, srv4.....)
  4. alter database db1 set enable_broker (srv2, srv3, srv4.....)

After that SQL Server log on each server is full bellow errors, nobody so
far can help me

Could you help, please

############
SRV2
03/03/2008 18:54:41,spid21s,Unknown,The query notification dialog on
conversation handle '{E6BF547B-0AE6-DC11-A4BD-00E08127B819}.' closed due to
the following error: '<?xml version="1.0"?><Error
xmlns="http://schemas.microsoft.com/SQL/ServiceBroker/Error"><Code>-8490</Code><Description>Cannot find the remote service
'SqlQueryNotificationService-53c1dc9b-7d22-4310-a5b6-18ac97ae4bf3'
because it does not exist.</Description></Error>'.
03/03/2008 18:54:41,spid27s,Unknown,The query notification dialog on
conversation handle '{AA68F7D8-F7E5-DC11-A4BD-00E08127B819}.' closed due to
the following error: '<?xml version="1.0"?><Error
xmlns="http://schemas.microsoft.com/SQL/ServiceBroker/Error"><Code>-8490</Code><Description>Cannot find the remote service

SERV3
03/02/2008 00:32:25,spid21s,Unknown,The query notification dialog on
conversation handle '{2BC70B27-F1E3-DC11-AB50-0017085CAA29}.' closed due to
the following error: '<?xml version="1.0"?><Error
xmlns="http://schemas.microsoft.com/SQL/ServiceBroker/Error"><Code>-8490</Code><Description>Cannot find the remote service
'SqlQueryNotificationService-abc6a7ce-53f1-411e-85a7-50c09e2699e1'
because it does not exist.</Description></Error>'.
03/02/2008 00:29:20,spid22s,Unknown,The query notification dialog on
conversation handle '{DF112861-F9E3-DC11-AB50-0017085CAA29}.' closed due to
the following error: '<?xml version="1.0"?><Error
xmlns="http://schemas.microsoft.com/SQL/ServiceBroker/Error"><Code>-8490</Code><Description>Cannot find the remote service

SRV4
03/02/2008 16:15:07,spid25s,Unknown,The query notification dialog on
conversation handle '{4179E578-7DE4-DC11-9A69-00145E1B71FC}.' closed due to
the following error: '<?xml version="1.0"?><Error
xmlns="http://schemas.microsoft.com/SQL/ServiceBroker/Error"><Code>-8490</Code><Description>Cannot find the remote service
'SqlQueryNotificationService-01e16746-e114-4e8c-b587-91e93768a9a8'
because it does not exist.</Description></Error>'.
03/02/2008 16:15:07,spid20s,Unknown,The query notification dialog on
conversation handle '{5079E578-7DE4-DC11-9A69-00145E1B71FC}.' closed due to
the following error: '<?xml version="1.0"?><Error
xmlns="http://schemas.microsoft.com/SQL/ServiceBroker/Error"><Code>-8490</Code><Description>Cannot find the remote service
############

All replies (8)

Tuesday, March 18, 2008 6:52 AM

You should never have to copies of the same service broker guid on any server in the world. Therefore if you copy a database you should NEW_BROKER the service broker in it to create a new broker identity, see http://msdn2.microsoft.com/en-us/library/ms166057(SQL.100).aspx

 

Also the errors you show have nothing to do with Service Broker. Here SSB just reports the problem (a service is missing), but the cause of the problem is whatever application created those services and dropps them. In this case is SqlDependency. See http://rusanu.com/2007/11/10/when-it-rains-it-pours/ for more details.


Tuesday, March 18, 2008 10:01 PM

Hello,

Thank you, do you mean when I restore database from SRV1 on another server should I use NEW_BROKER?

############

SRV2
restore database db1
from disk = 'd:\db1_from_srv1.bak'
with NEW_BROKER

SRV3
restore database db1
from disk = 'd:\db1_from_srv1.bak'
with NEW_BROKER

SRV4
restore database db1
from disk = 'd:\db1_from_srv1.bak'
with NEW_BROKER

############

Correct?

NEW _BROKER - "This option ends all existing conversations in the database, and returns an error for each conversation."

"Ends" but don't remove should I remove queues and services manually or don't touch it? (http://img122.imageshack.us/img122/549/clipqk5.jpg)

And what about this existing databases which I restored witch the same guid, can I repair this without impact on database accessibility?

I mean how to stop bellow errors on each server:

############

03/03/2008 18:54:41,spid21s,Unknown,The query notification dialog on
conversation handle '{E6BF547B-0AE6-DC11-A4BD-00E08127B819}.' closed due to
the following error: '<?xml version="1.0"?><Error
xmlns="http://schemas.microsoft.com/SQL/ServiceBroker/Error"><Code>-8490</Code><Description>Cannot find the remote service

############

Thanks in advance.


Friday, March 21, 2008 8:06 AM

I assume that your backup/restore have copy semantics (not move semantics) and since every copy of the database must have an unique broker ID, so you need to NEW_BROKER when you restore.

 

The problem of the errorlog messages, as I explained in my blog entry, is a SqlDependency problem, not a service broker problem. First place to look is your application and how it uses the SqlDependency. There are many things that can be misused and result in this error messsage, you're gonna have to find out how are the services in question dropped. Use SQL Profiler.


Wednesday, April 16, 2008 7:47 PM

Hello,

Thank you Remus very much, I was wrong that that Service Broker cause problems.

I resolved it reading your great blog about Service Broker.

Thank you.

ps.
one additional question, when I restore database on new server with new service broker (I learned that from you :-) )

restore database db1
from disk = 'd:\db1_from_srv1.bak'
with NEW_BROKER,
move 'db' to ''d:\data\db.mdf,
move ''db_log to 'e:\data\db_log.ldf'

what about existing queues and services, should I drop it or leave it?

http://img122.imageshack.us/img122/549/clipqk5.jpg


Thursday, April 17, 2008 3:24 PM

 anxcomp wrote:
Hello,


what about existing queues and services, should I drop it or leave it?


 

I really can't give a specific answer to this. If the services and queues are needed by applications running on the new location, then they should be left in place. If they are not needed, then go ahead and drop them.

One thing is sure, any temporary service/queue created by SqlDependency (those pesky SqlQueryNotificationService-{guid}' names) should be dropped. Normally these would clean up themselfs, but the NEW_BROKER option is nuke-ing the dialog timers that should clean them up.


Thursday, April 17, 2008 10:07 PM

No, services and queues aren't needed by application running on the new location, so I drop them.

I'm relay happy that you help me with that problem, I asked about it on another forums, newsgroup etc. but nobody can't help.

Thank you again for your help and opinion.


Thursday, May 7, 2015 1:34 PM

I resolved it reading your great blog about Service Broker.

Hi, Geek.

Can you share your solution to this?

I have very similar situation (exactly same error). Also had another error related with DB master key which I solved by simply creating one.

About query notification. I checked sys.service_queues and see there 3 records: QueryNotificationErrorsQueue, EventNotificationErrorsQueue, ServiceBrokerQueue.

All of them created 10 years ago (same is the last modification time), activation_procedure = NULL, is_receive_enabled = 1, is_enqueue_enabled = 1.

Maybe I should just drop them (because of activation_procedure = NULL)?


Thursday, May 7, 2015 9:22 PM

Rather than replying to a seven year old thread, start a new thread and describe your problem from the beginning.

Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se