Closed shaikaijaz closed 57 minutes ago
@olahallengren , Can you please help here.
This looks like a bug in SQL Server. It should work to perform checkdb on secondary replicas in Enterprise Edition.
It is working perfectly on other AlwaysOn servers but not this.
On Sat, 24 Oct 2020, 10:25 pm Ola Hallengren, notifications@github.com wrote:
This looks like a bug in SQL Server. It should work to perform checkdb on secondary replicas in Enterprise Edition.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/olahallengren/sql-server-maintenance-solution/issues/412#issuecomment-715992727, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARA7YZXDKS7XJK4IL6JAMF3SMMBHZANCNFSM4RQOQEOA .
Are the other server also Enterprise Edition? Do all the servers have the same CU?
Could you try executing this script on both replicas?
USE [master]
GO
DBCC CHECKDB ([DatabaseName]) WITH NO_INFOMSGS, ALL_ERRORMSGS, DATA_PURITY
GO
Could you try installing the latest CU?
Is this issue still happening?
This issue can occur on Enterprise edition if you have performed an edition upgrade from Standard edition. This occurs on SQL 2019 with CU 17. Running the DBCC command manually results in the same error.
You also get this error if you try to enable readable secondaries - even though you are now on enterprise edition:
"The specified command is invalid because the Always On Availability Groups allow_connections feature is not supported by this edition of SQL Server. For information about features supported by the editions of SQL Server, see SQL Server Books Online."
The solution is to drop and re-create the availability groups.
Thank you, @DavidWiseman. This is by design in SQL Server.
"Basic availability groups cannot be upgraded to advanced availability groups. The group must be dropped and re-added to a group that contains servers running only SQL Server 2016 Enterprise Edition."
Description of the issue DatabaseIntegrityCheck for User databases is failing on the secondary server in SQL ALwaysOn AG. This was working fine until recent windows patches were installed on the server. Post that, this job is failing. Other jobs such as Backups are running successfully.
SQL Server version and edition Microsoft SQL Server 2017 (RTM-CU19) (KB4535007) - 14.0.3281.6 (X64) Jan 23 2020 21:00:04 Copyright (C) 2017 Microsoft Corporation Enterprise Edition (64-bit) on Windows Server 2019 Standard 10.0 (Build 17763: ) (Hypervisor)
Version of the script Ran latest script but still the same issue.
What command are you executing? sqlcmd -E -S $(ESCAPE_SQUOTE(SRVR)) -d DatabaseName -Q "EXECUTE [dbo].[DatabaseIntegrityCheck] @Databases = 'USER_DATABASES', @LogToTable = 'Y'" -b
What output are you getting? Database: [ProCal58S] Status: ONLINE Standby: No Updateability: READ_WRITE User access: MULTI_USER Is accessible: Yes Recovery model: FULL Availability group: WSSQLPRD17AG Availability group role: SECONDARY Date and time: 2020-09-17 02:36:26 Command: DBCC CHECKDB ([DatabaseName]) WITH NO_INFOMSGS, ALL_ERRORMSGS, DATA_PURITY Msg 976, Level 14, State 1, Server ServerName, Line 1 The target database, 'DatabaseName', 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. Process Exit Code 1. The step failed.