question

pamkagel avatar image
pamkagel asked

Always On and changing compatibility levels

We just upgraded to 2016 with our databases still in compatibility mode 2014. If I want to update to make them 2016 is there anything special I need to do since they are in Always On availability groups? Will updating on the primary automatically change on the secondary?

always-oncompatibility-level
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

· Write an Answer
JohnM avatar image
JohnM answered

As long as the corresponding applications are supported at the higher compatibility level, you can update them and the change will be sent to the secondaries automatically. I'd advise testing your applications first with the higher compatibility level before doing it in Production just to be safe.

3 comments
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Will it? A lot of "ALTER DATABASE" commands need the database to not be in an AG. Admittedly, I've not tried changing the compatibility level, but I have had problems when, for example, marking a DB as trustworthy, or when changing the containment level.

+1 for testing up-front, though. And, better, if your test environment also has the DBs in an AG.

1 Like 1 ·
JohnM avatar image JohnM ThomasRushton ♦♦ ·

Yup, I actually just tested it just to confirm and lowered the compatibility level of a dummy database that is in an AG (and back again) and no issues. It might need an exclusive lock on the database (I can't remember) so the ALTER might have to be timed with application load.

I second your thought on having the test environment in an AG as well. Bonus points & Kudos if that is true.....

1 Like 1 ·

Thank you . Will definitely test first

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.