KB3152965 - FIX: Error 1478 when you add a database back to the AlwaysOn availability group in SQL Server

Applies To
SQL Server 2012 Service Pack 3 SQL Server 2012 Developer SQL Server 2012 Enterprise SQL Server 2012 Enterprise Core SQL Server 2012 Express SQL Server 2012 Standard SQL Server 2012 Web SQL Server 2014 Developer - duplicate (do not use) SQL Server 2014 Enterprise - duplicate (do not use) SQL Server 2014 Enterprise Core - duplicate (do not use) SQL Server 2014 Express - duplicate (do not use) SQL Server 2014 Standard - duplicate (do not use) SQL Server 2014 Web - duplicate (do not use) SQL Server 2016 Developer - duplicate (do not use) SQL Server 2016 Enterprise - duplicate (do not use) SQL Server 2016 Enterprise Core - duplicate (do not use) SQL Server 2016 Standard - duplicate (do not use)

Symptoms

Consider the following scenario:

  • You use the AlwaysOn availability groups feature in Microsoft SQL Server 2012, 2014, or 2016.
  • You back up a transaction log of a database while there are transaction log activities.
  • The transaction log activities stop after the backup completed.
  • You remove the database from the AlwaysOn availability group.

In this scenario, when you add the database back to the AlwaysOn availability group, error 1478 occurs.

Resolution

The issue was first fixed in the following cumulative update of SQL Server:

Recommendation: Install the latest cumulative update for SQL Server

Each new cumulative update for SQL Server contains all the hotfixes and all the security fixes that were included with the previous cumulative update. We recommend that you download and install the latest cumulative updates for SQL Server:

      

Workaround

To work around this issue, create a transaction log backup on the primary replica, restore the log backup on the secondary replica with no recovery, and then rejoin the secondary replica to the AlwaysOn availability group.

Status

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

References

Learn about the terminology Microsoft uses to describe software updates.