Change connection string for Octopus server

We have Octopus using a SQL configured with always on availability groups. I am trying to add MultiSubnetFailover=true;ApplicationIntent=ReadWrite to the connection string to make sure it will handle failover properly.

The home directory of the server is d:\Octopus
I update the setting for Octopus.Storage.ExternalDatabaseConnectionString in OctopusServer.config with the additional settings
I save the file
I reboot the server
I open the Octopus Manager and it shows the old connection string

How can I change the configuration string for the server properly?

Hi Tom,

Thanks for getting in touch!

Those steps should definitely result in a changed connection string. A couple of things you might want to check.

  1. Open the registry editor (regedit) and navigate to HKLM/Software/Octopus/OctopusServer/[node] and verify that the ConfigurationFile setting is pointing at the same configuration file you’re editing. If the server has been upgraded from 2.6, there may be an old configuration file lying around.
  2. Try changing the connection string to something that definitely won’t work and restarting the Octopus service. If you get a failure, then you’re changing the right value. Octopus may not show the full connection string in the Manager UI.

I hope that helps!
Damo

I have confirmed I’m looking at the right file. I just need to confirm what the Manager UI is showing. My connection string is like this:

aws-dev1-sql.nobrainer2.com;MultiSubnetFailover=true;ApplicationIntent=ReadWrite;Initial Catalog=octopus;Integrated Security=True

The UI shows:

aws-dev1-sql.nobrainer2.com;Database=octopus;Integrated Security=True

So does the UI manager parse the connection string just for display?

I need to insure that the app is actually using MultiSubnetFailover. Otherwise, I have problems if I ever have a failover on the SQL cluster, which is something we force commonly (and plan to eventually script) when we have a schema change that would otherwise cause downtime.

Tom Cabanski | Director of Software Development
C: (832) 766-5961
tomc@blinds.commailto:tomc@blinds.com

Hi Tom,

Yes, if the contents of the configuration file show the correct connection string, that’s the one Octopus will use.

You’re correct - the Octopus Manager parses the connection string and gives limited information (including leaving out the username and passwords if they’re used).

To make sure it’s using the correct one, look for the Octopus.Storage.ExternalDatabaseConnectionString key in the server config file mentioned in my last reply. If that’s correct, it will be fine!

Damo