0
votes

I've configured an active Geo replication for Azure SQL DB. I have primary and secondary database without failover policy. Also, I have an App Service which fetches data by using primary database connection string. After doing forced failover, reads are working fine most of time but my inserts/updates were failed.

My question is do I need to update my connection string(pointing to secondary database which has become primary database now due to failover) in the App Service to make insert/update work or is there any other way to make my application work without changing connection string in my app service?

Thanks In Advance!!!

P.S - I am new to Azure.

1
If you want to implement disaster recovery, please refer to docs.microsoft.com/en-us/azure/azure-sql/database/…Jim Xu

1 Answers

0
votes

There are two types of authentication level:

  1. server level
  2. database level

When you are using SQL admin server user(server-level authentication) then you must update connection string manually in the application.

If you do not want to update connection string then follow this to handle this situation by creating contained DB users in the primary database, wait until the next replication takes place or manual failover, and then try, here the authentication work on database level.

For more information:https://docs.microsoft.com/en-us/sql/relational-databases/security/contained-database-users-making-your-database-portable?view=sql-server-2017