FIX: Automatic seeding assertions occur when databases are removed from AG in SQL Server 2016 and 2017

Dotyczy: SQL Server 2016 DeveloperSQL Server 2016 EnterpriseSQL Server 2016 Enterprise Core

Symptoms


Assume that you use automatic seeding to initialize secondary replica databases in Always On availability groups (AG). When you remove a database from the Always On availability groups before the seeding can be done, you will notice that SQL Server begins reporting assertions associated with the failed automatic seeding operations. Additionally, you may receive error messages that resemble the following:

spid#   Automatic seeding of availability database 'DatabaseName' in availability group 'AG' failed with a transient error. The operation will be retried.
spid#   Automatic seeding of availability database 'DatabaseName' in availability group 'AG' failed with a transient error. The operation will be retried.
spid#   Error: 3202, Severity: 16, State: 1.
spid#   Write on "{FileName}" failed: 995(The I/O operation has been aborted because of either a thread exit or an application request.)
spid#   Error: 3271, Severity: 16, State: 1.
spid#   A nonrecoverable I/O error occurred on file "{FileName}:" 995(The I/O operation has been aborted because of either a thread exit or an application request.).
spid#   Error: 41169, Severity: 16, State: 4.
spid#   An error occurred while attempting to access the availability group database with ID 'IDNumber' in availability group 'AG'.  The availability database is not found in the availability group configuration.  Verify that the availability group name and availability database ID are correct, then retry the command.

Status


Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section. 

Resolution


The issue is fixed in the following cumulative updates for SQL Server:
About cumulative updates for SQL Server:

Each new cumulative update for SQL Server contains all thehotfixes and all the security fixes that were included with the previouscumulative update. Check out the latest cumulative updates for SQL Server:

References


Learn about the terminology thatMicrosoft uses to describe software updates.