I recently opened a support ticket stating "Last night we underwent monthly windows patching. Patching is automated and we have multiple servers patched in a round robin fashion. after the patch the server (source and target for our log stream task and replication task) is rebooted. During this reboot all of our task errored out causing several alerts. Some of the task were able to be resumed, but a majority needed to be reloaded. Is there a way to make all of these task more resilient to windows patching so I would not have to reload all of my task monthly?"
During the described reboot our sql server databases go into recovery mode for a short bit. At this point Replicate errors out with the message:
00009292: 2021-08-23T21:46:07 [METADATA_MANAGE ]E: RetCode: SQL_ERROR SqlState: 42000 NativeError: 983 Message: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Unable to access availability database 'DATABASENAME' because the database replica is not in the PRIMARY or SECONDARY role. Connections to an availability database is permitted only when the database replica is in the PRIMARY or SECONDARY role. Try the operation again later. [1022502] (ar_odbc_conn.c:563)
Due to other reasons the task eventually had to be reloaded, but is there a way to make the above message a recoverable error instead of a fatal error or is there a way to add retries to a fatal error?