FIX: Access violation when you create or configure an Always On availability group for an availability database in SQL Server 2012 and 2016

Gäller för: SQL Server 2012 DeveloperSQL Server 2012 EnterpriseSQL Server 2012 Enterprise Core

Symptoms


Assume that you create or configure an Always On availability group for an availability database by using the ALTER AVAILABILITY GROUP ADD DATABASE or CREATE AVAILABILITY GROUP FOR DATABASE statement in Microsoft SQL Server 2012 and SQL Server 2016. When the availability database is accidentally dropped, an access violation (AV) may occur. Sometimes, SQL Server may even crash.

Cause


This issue occurs because the ALTER AVAILABILITY GROUP ADD DATABASE statement and the CREATE AVAILABILITY GROUP FOR DATABASE statement don't acquire database locks when you create or configure the Always On availability group for the availability database. Therefore, the database might be deleted accidentally.

Resolution


Service pack information for SQL Server 2012

This issue is fixed in the following service pack for SQL Server:

          Service Pack 4 for SQL Server 2012

For more information about how to obtain the latest service pack, see How to obtain the latest service pack for SQL Server 2012

About Service packs for SQL Server

Service pack information for SQL Server 2016

This update is fixed in the following service pack for SQL Server:

       Service Pack 2 for SQL Server 2016

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 that Microsoft uses to describe software updates.