0

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.

0 Answers0