SQL Server 2022 contained availability group error 8906

Oscar Macdonald 11 Reputation points
2022-12-23T05:35:01.057+00:00

Using SQL Server 2022 RTM (16.0.1000.6) on a Windows Server 2022 (10.0.20348) with a single replica with the same build.

After creating a contained availability group called CONTAINED_AG, running DBCC CHECKDB([CONTAINED_AG_master]) will usually raise error 8906:

Msg 8906, Level 16, State 1, Line 2
Page (1:10) in database ID 16375 is allocated in the SGAM (1:3) and PFS (1:1), but was not allocated in any IAM. PFS flags 'MIXED_EXT ALLOCATED 0_PCT_FULL'.

The error logs also show this after the DBCC completes:

CHECKDB found 1 allocation errors and 0 consistency errors in table '(Object ID 99)' (object ID 99).
CHECKDB found 1 allocation errors and 0 consistency errors in database 'CONTAINED_AG_master'.
DBCC CHECKDB (CONTAINED_AG_master) executed by sa found 1 errors and repaired 0 errors. Elapsed time: 0 hours 0 minutes 0 seconds. Internal database snapshot has split point LSN = 000000df:00000110:0001 and first LSN = 000000df:00000100:0001.
RBPEX::NotifyFileShutdown: Called for database ID: [9], file Id [0]

The DBCC checks occasionally complete without any errors.
Usually these errors are resolved by taking the database out of the availability group and restoring from the last known good backup or by repairing with data loss. This database can't be removed from the availability group so neither of these are an option.
Taking a backup and restoring as a new database results in both allocation and consistency errors.
This happened on a different server with RC1 (16.0.950.9), so I created a new environment with the RTM version to rule out any beta issues.

Can anyone else reproduce this?

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

1 answer

Sort by: Most helpful
  1. Oscar Macdonald 11 Reputation points
    2022-12-23T05:43:01.233+00:00

    I asked this question before I found the SQL Server feedback website: https://feedback.azure.com/d365community/forum/04fe6ee0-3b25-ec11-b6e6-000d3a4f0da0
    It looks like others have found this bug too: https://feedback.azure.com/d365community/idea/6d995092-7c15-ed11-a81b-6045bd8606d4

    1 person found this answer helpful.