Symptoms
Consider the following scenario:
-
You have Cumulative Update 7 for Microsoft SQL Server 2012 Service Pack 1 (SP1) installed.
-
You enable the AlwaysOn Availability Groups feature in SQL Server 2012.
-
You enable the Log Shipping feature for some databases that are in the AlwaysOn availability group.
-
You set the backup preference for the Availability Group to Prefer Secondary.
-
You run the system function sys.fn_hadr_backup_is_preferred_replica to determine whether the current replica is the preferred backup replica both on primary and secondary database.
In this scenario, the system function may return 1 on both sides incorrectly.
Cause
This issue occurs because of a regression that occurs when the hotfix in KB 2887115 is installed.
Resolution
Cumulative Update 8 for SQL Server 2012 SP1 /en-us/help/2917531
Each new cumulative update for SQL Server contains all the hotfixes and all the security fixes that were included with the previous cumulative update. Check out the latest cumulative updates for SQL Server:
Hotfix information A supported hotfix is available from Microsoft. However, this hotfix is intended to correct only the problem that is described in this article. Apply this hotfix only to systems that are experiencing this specific problem.
If the hotfix is available for download, there is a "Hotfix Download Available" section at the top of this Knowledge Base article. If this section does not appear, submit a request to Microsoft Customer Service and Support to obtain the hotfix. Note If additional issues occur or if any troubleshooting is required, you might have to create a separate service request. The usual support costs will apply to additional support questions and issues that do not qualify for this specific hotfix. For a complete list of Microsoft Customer Service and Support telephone numbers or to create a separate service request, visit the following Microsoft website:http://support.microsoft.com/contactus/?ws=supportNote The "Hotfix Download Available" form displays the languages for which the hotfix is available. If you do not see your language, it is because a hotfix is not available for that language.
Restart requirementYou do not have to restart the computer after you apply this hotfix.
Hotfix replacement informationThis hotfix does not replace a previously released hotfix.
Status
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.