DBCC checkdb error with error state 6 on Primary replica of Always on AG.

Devendra Yadav 1 Reputation point
2020-09-28T12:04:39.023+00:00

Dear Experts,

I have configured always on Ag with two nodes (Primary and secondary read only) replicas in synchronous mode.
Primary has maintenance job of Database integrity check which failed and found the following errors. Not sure exactly if there's something wrong with the DB or what should be my actions on this.

Error in the Job log file---
Command: DBCC CHECKDB ([MyDB]) WITH NO_INFOMSGS, ALL_ERRORMSGS, MAXDOP = 4 [SQLSTATE 01000]
Msg 0, Sev 0, State 1: Unspecified error occurred on SQL Server. Connection may have been terminated by the server. [SQLSTATE HY000]
Msg 596, Sev 21, State 1: Cannot continue the execution because the session is in the kill state.

(Please note - this was not killed by anyone nor did any failover happened)

Error in the SQL server error log file ---
DBCC CHECKDB (MyDB) WITH all_errormsgs, no_infomsgs, maxdop = 4 executed by Domain\DBadmin terminated abnormally due to error state 6. Elapsed time: 1 hours 1 minutes 38 seconds.

Thanks & Regards,
Devendra

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
13,361 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. CathyJi-MSFT 21,131 Reputation points Microsoft Vendor
    2020-09-29T08:34:39.83+00:00

    Hi @devendra ,

    > Msg 0, Sev 0, State 1: Unspecified error occurred on SQL Server. Connection may have been terminated by the server. [SQLSTATE HY000]
    >Msg 596, Sev 21, State 1: Cannot continue the execution because the session is in the kill state.

    Please refresh your SQL server instance and check the database state again.

    > DBCC CHECKDB (MyDB) terminated abnormally due to error state 6. Elapsed time: 1 hours 1 minutes 38 seconds.

    Please check if this blog DBCC CHECKDB … Terminated Abnormally Due to Error State 6. could help you. As others mentioned, suggest you check your error log or agent log to find more related error message.

    Best regards,
    Cathy


    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.

  2. Shashank Singh 6,251 Reputation points
    2020-09-28T14:59:25.15+00:00

    DBCC CHECKDB (MyDB) WITH all_errormsgs, no_infomsgs, maxdop = 4 executed by Domain\DBadmin terminated abnormally due to error state 6. Elapsed time: 1 hours 1 minutes 38 seconds.

    How are you running the checkdb via TSQL query or maintenance plan. It seems like the checkdb was cancelled by user or by some external force like database shutdown or may be server shutdown.