Hello,
I have two servers, both with Windows 2019 STD + SQL Server 2017 STD installed.
The hosted MS SQL Databases are being replicated using Basic Always on Availability Groups, while testing Windows Server Backup (full server backup) on the primary and secondary SQL Server, I've found out that the backup completes successfully on the primary server, but on the replica server the backup finishes with errors.
Before jumping to conclusions, during the testing period I used SQL Server 2017 Evaluation (feature level equivalent to SQL Server 2017 Enterprise), with the same configuration, and on both primary and secondary servers, Windows Server Backup finishes without issues.
The reason it doesn't work on the Standard version of SQL Server 2017 is because the secondary replica cannot be set to readable during the backup process, and so the backup finishes with errors.
The error as shown in the Event Viewer:
Log Name: Application
Source: SQLWRITER
Date: 9/10/2019 12:52:52 AM
Event ID: 24583
Task Category: None
Level: Error
Keywords: Classic
User: N/A
Computer: SERVERNAME
Description:
Sqllib error: OLEDB Error encountered calling ICommandText::Execute. hr = 0x80040e14. SQLSTATE: 42000, Native Error: 3013
Error state: 1, Severity: 16
Source: Microsoft SQL Server Native Client 11.0
Error message: BACKUP DATABASE is terminating abnormally.
SQLSTATE: 42000, Native Error: 976
Error state: 1, Severity: 14
Source: Microsoft SQL Server Native Client 11.0
Error message: The target database, 'WideWorldImporters', is participating in an availability group and is currently not accessible for queries. Either data movement is suspended or the availability replica is not enabled for read access. To allow read-only
access to this and other databases in the availability group, enable read access to one or more secondary availability replicas in the group. For more information, see the ALTER AVAILABILITY GROUP statement in SQL Server Books Online.
Is there any way to do a full server backup on the secondary replica server? I mean other than doing a fail over, backup and then fail back to primary.
Thank you!