SQL SERVER – Availability Groups Can Propagate Database Compatibility Level

Propagation of Compatibility Level occurs through the availability group’s database synchronization. Change the database setting on the primary replica.

Two connected cabinets retain separately inspectable fitting profiles.

SELECT @@SERVERNAME AS InstanceName, name, compatibility_level,
       state_desc, is_read_only
FROM sys.databases WHERE name=N'YourAvailabilityDatabase';

My earlier answer incorrectly recommended failover to change every replica separately. Compatibility level belongs to the database. It isn’t an independent configuration of each SQL Server instance. The database change flows to the secondary through data movement.

Jim Evans documents this behavior in a SQL Server 2019 availability-group migration. The firsthand checklist changes compatibility level on the primary, then checks the synchronized secondaries. That evidence contradicts the original blanket answer.

Connect directly to each intended replica and compare the database name and compatibility level. Also check its role and synchronization state. Paused movement, replay lag or a different database can explain an apparent mismatch. Refreshing SSMS isn’t a propagation test.

Test the target level against a representative workload before an approved primary change. Monitor plans and performance afterward. Failover isn’t required solely to apply this database setting on every replica. Engine upgrades follow their own supported sequence.

References: Jim Evans: SQL Server 2019 migration and secondary propagation; Availability-group log transport and database synchronization; Compatibility-level scope and supported levels.

Related reading

A compatibility change is not a reason to cycle through replicas, it is a database change to validate through synchronization.

Published by Pinal Dave on SQLAuthority. More of my work at pinaldave.com.


Discover more from SQL Authority with Pinal Dave

Subscribe to get the latest posts sent to your email.

AlwaysOn, Compatibility Level, SQL High Availability, SQL Mirroring, SQL Server
Previous Post
SQL SERVER – STRING_ESCAPE() for JSON – String Escape
Next Post
SQL SERVER – Creating Multiple Backup Files – Stripped

Related Posts

1 Comment. Leave new

  • You are wrong, You can update them and the change will be sent to the secondaries automatically.

    I’m just tested it to confirm. Lowered the compatibility level of a dummy database that is in an Availibilty Group (and back again) with no issues!

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

Fill out this field
Fill out this field
Please enter a valid email address.