Skip to main content
Solved

'DatabaseConnectionString' parameter change


Forum|alt.badge.img+2
  • Do Gooder (Employee)
  • 9 replies

Hi Experts,

One of our customers is seeking guidance on modifying the DatabaseConnectionString parameter and they are using Azure SQL.

 

Question:

Would it be advisable to use an IP address and port instead of the SQL Server name to mitigate potential DNS caching issues?

 

Current Connection String:

<DatabaseConnectionString>Server=xxxx.database.windows.net;database=xxxx;user id=XXXXXXXXX;password='xxxxxxxx';Enlist='false';pooling=true;Application Name='FSMServer';Min Pool Size=20;Max Pool Size=1000;</DatabaseConnectionString>

 

-Given that they are using Azure SQL, is this approach feasible?

-If so, what steps should be taken to implement it correctly?

 

Any insights or recommendations would be greatly appreciated!

 

Best regards,

Suvini Samarasekara.

Best answer by roklde

Hi,

sorry, my comment about making a manual change via the web.config doesn’t apply to Azure DBs. As far as I’m aware you can only connect to the Azure DB using the FQDN as all traffic is routed through a Azure Gateway as seen here:
https://learn.microsoft.com/en-us/azure/azure-sql/database/connectivity-architecture?view=azuresql

Although, it seems that you could try using the Azure Gateway IP somehow as stated here:
https://stackoverflow.com/questions/37145951/associate-static-ip-to-a-azure-sql-server-database
However, I wouldn’t recommend this as it could introduce all sort of new issues, e.g. sudden change of Gateway IPs or maybe unavailability due to certain Gateways being down.

Lastly, I think it’s possible to create a VNET and assign some private static IP to the Azure DB. However, I’m not sure if FSM will be able to consume that IP, when the Install-type is Azure. You will have to figure this out doing a PoC.

Best regards
Roman

View original
Did this topic help you find an answer to your question?

3 replies

roklde
Superhero (Employee)
Forum|alt.badge.img+26
  • Superhero (Employee)
  • 745 replies
  • March 12, 2025

Hi Suvini,

although it would be possible to change the database connection string via editing the web.config-file, this isn’t a recommended approach. When running the FSM Installer for Azure deployments, the installer defaults to the FQDN and fetches the available DB from the given Azure Subscription.
 



Thus, you won’t be able to change it to IP & Port within the Installer and would require to change it manually after each deployment. If there is no given reason, I wouldn’t recommend to make any changes.

Best regards
Roman


Forum|alt.badge.img+2
  • Author
  • Do Gooder (Employee)
  • 9 replies
  • March 12, 2025

Hi ​@roklde,

 

Thank you for the response!

If it is feasible to replace the SQL Server name with an IP address and port how can we do that, could you please provide any (working) example. 

Because, we suggested them as follows but after change like that they got an error since Azure is binding by hostname of the server 

 

Ex:

<DatabaseConnectionString>Server=192.168.1.100,1433;Database=xxxxxx;User Id=xxxxx;Password=xxxxxxxxxx;Enlist=false;Pooling=true;Application Name=FSMServer;Min Pool Size=20;Max Pool Size=1000;</DatabaseConnectionString> 
 

Replace SQL server name with the IP address of the SQL Server (e.g., 192.168.1.100)
Specify the port number (e.g., 1433 for default) after a comma (,).

 

Error:

{"Message":"The type initializer for 'Metrix.BusinessServer.DataConnector.DataAccessGateway' threw an exception.\r\n"}

 

They aim to avoid potential DNS caching issues during data transfer by using this approach.

 

Thanks & BR,

Suvini


roklde
Superhero (Employee)
Forum|alt.badge.img+26
  • Superhero (Employee)
  • 745 replies
  • Answer
  • March 13, 2025

Hi,

sorry, my comment about making a manual change via the web.config doesn’t apply to Azure DBs. As far as I’m aware you can only connect to the Azure DB using the FQDN as all traffic is routed through a Azure Gateway as seen here:
https://learn.microsoft.com/en-us/azure/azure-sql/database/connectivity-architecture?view=azuresql

Although, it seems that you could try using the Azure Gateway IP somehow as stated here:
https://stackoverflow.com/questions/37145951/associate-static-ip-to-a-azure-sql-server-database
However, I wouldn’t recommend this as it could introduce all sort of new issues, e.g. sudden change of Gateway IPs or maybe unavailability due to certain Gateways being down.

Lastly, I think it’s possible to create a VNET and assign some private static IP to the Azure DB. However, I’m not sure if FSM will be able to consume that IP, when the Install-type is Azure. You will have to figure this out doing a PoC.

Best regards
Roman


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings