Cannot enable the Service Broker in database "xxx" because the Service Broker GUID in the database (guid number) does not match the one in sys.databases (different guid number)

Version 1

    Details

    Cannot enable the Service Broker in database "xxx" because the Service Broker GUID in the database (guid number) does not match the one in sys.databases (different guid number)


    This issue can happen when trying to configure Service Broker on a database that has been restored / copied from another source.
    This generally happens because the master database also keeps track of the service broker for each database, so this is just saying the master database thinks the service broker has last processed a different record to the one the database believes. 

     


    Resolution

     

    The quickest fix is just to reset the service broker as follows:

    1) Close all open instances of GoldMine
    2) Open SQL management Studio
    3) Backup the GoldMine SQL database
    4) Open a new SQL query window
    5) Run the following script to set a new service broker for the GoldMine database

    ALTER DATABASE <XXX> SET NEW_BROKER WITH ROLLBACK IMMEDIATE

    This will drop and recreate all service broker settings and queues – Note: Only use this if you really do want to reset everything, don't do it if there are queues with statements that you want processing – (which shouldn't be the case for GoldMine but may affect GISME or other 3rd party solutions that integrate with GoldMine)