I’m working on implementing failover for a web app that uses Azure SQL database with Geo-Replication. The web app connects to the primary database correctly, but I’m having trouble getting the web app to connect to the secondary database, which is in a read-only state.
The problem seems to be that the user of the database was replicated along with the data/schema to the secondary database, but the login was not replicated. I created a new login, but I can’t associate it with the existing user.
The command that keeps coming in searches is
ALTER USER [myUser] WITH LOGIN = [myLogin], but that alters the database user, which I not only want to avoid but is also not possible when the database is read-only.
How can I associate the login with the existing user so that the web app can connect to the secondary database?