Quantcast
Channel: SQL Server High Availability and Disaster Recovery forum
Viewing all articles
Browse latest Browse all 4689

DBCC CheckDB fails on Secondary replica with error it is not enabled for read access...

$
0
0

The customer failed over their "Availability Group" 5 days before the DBCC Checkdb job ran on the secondary replica and failed with this error:

Executed as user: xxx Sqlcmd: Error: Microsoft ODBC Driver 11 for SQL Server : The target database, 'DBAAdmin', 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

Can someone tell me why?

It is my understanding the secondary sql server should be able to run dbcc checkdb without having "read-only" access enabled. 

The customer is running Microsoft SQL Server 2014 - 12.0.4213.0 (X64)  and is using Ola Hallengren DB Maintenance script but is running the script using "CmdExec" vs "transact sql" not sure that makes a difference or not. The Ola Hallengren script is in a database that is part of the "Availability Group". 

Thanks,
Sue




Sue


Viewing all articles
Browse latest Browse all 4689

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>