Score:0

Simulate Outage on primary SQL Server in Azure Failover Group

in flag

I have a SQL Server with SQL Database in Azure that is replicated to a secondary SQL Server with a Failover Group. We have some functionality in code to redirect failed read requests to the secondary in cases where the primary is inaccessible but hasn't failed over to the secondary yet.

How can I create transient failures on the primary database to test our redirection code?

These tests will be run in a non-production environment, so I'm fairly open to options. We handle redirecting the traffic by modifying the read/write listener URL to point to the read only listener in code following the Azure naming convention for failover group listeners. If we had each endpoint separately set through configuration we could just botch the primary connection string in configuration. But I'd prefer to avoid this method as it would mean temporarily reworking the code and testing it in a state we don't plan to release it in.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.