I have 2 SQL server 2016 standard Servers. One for reporting (DB2) and one for production (DB1).
They are both nodes on a WSFC.
DB1 replicates the production database to DB2 with the distibutor being on DB2 (this is for reporting purposes since secondary replicas aren't readable in SQL 2016 Standard).
I have and an availability group (AG_DIST) on DB2 for the distribution database with primary replica on DB2, secondary replica on DB1 and a listener (Dist_lsnr). This AG ensures that the distribution database is always available.
On DB1 I have another AG (AG_PROD) for the PROD database with primary replica on DB1, secondary replica on DB2 and a listener (PROD_lsnr). (This is for HA)
All is well when I fail over WSFC or fail AG_DIST to DB1. The problem arises when failing over AG_PROD to DB2. When this is done the application connections using PROD_lsnr lose connectivity with the PROD database. When I fail the AG back the applications can again connect to the database.
What am I overlooking here?