How to setup Hybrid Connection's secondary connection-string in Azure

855 views Asked by At

I have successfully setup a Hybrid Connection to connect my Azure web-application to an on-premises SQL-server. I added the primary on-premises gateway connection string and it's listed with the command: Get-HybridConnection.

enter image description here

However it does not always stay connected. Now I wonder what to to with the secondary connection string. If I try to add it with Add-HybridConnection I get this error:

Add-HybridConnection : Existing configuration Endpoint=hc://xxxx.hybrid.biztalk.windows.net/xxxxx;SharedAccessKeyName=defaultListener;SharedAccessKey=xxxxxxx found.

So you cannot add both the primary and secondary connection strings to the same on-premises Hybrid Connection Manager. Should I install another Hybrid Connection Manager on another server and set that up with the secondary connection? I have tried that and it seams to work (connection keeps connected when I stop one of the services), but I can nowhere find info on it.

I also wonder when to click the Sync Primary Key or Sync Secondary Key in the Azure Portal.

1

There are 1 answers

1
JoeBrockhaus On BEST ANSWER

Only one connection string can be synced at a time. [e](from an individual app or hcm)[/e]

When you click 'Sync [Primary/Seconary] Key', this instructs the stack to use the secondary key.

You would use this if you need to regenerate one of the keys, but maintain HC uptime while you do.