Upgrading SQL 2019 to SQL 2022

SQLDev 96 Reputation points
2023-08-19T16:58:21.4933333+00:00

Hello, We are planning to upgrade SQL 2019 to SQL 2022. As with SQL 2022, we can add master & msdb databases to the SQL Alwayson Availability group, so that local SQL logins along with AD logins and SQL jobs can be synced between the primary and secondary replica's of AAG, that's the primary reason we are thinking about upgrading to SQL 2022. As we really need that feature in our environment. Wondering if any one is doing the same in your environment. Appreciate your feedback. Also please refer me to any links I can use in setting up for adding master & msdb databases to SQL 2022 AAG. Thanks.

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

2 answers

Sort by: Most helpful
  1. Javier Villegas 900 Reputation points MVP
    2023-08-19T20:03:12.2766667+00:00

    Hi @SQLDev

    I am using Contained Availability Groups in SQL Server 2022. But note that you have to re-create the AG with the contained option after the upgrade. They are quite good actually but you have to consider what I have mentioned

    Hope it helps

    Regards

    Javier


  2. RahulRandive 10,311 Reputation points
    2023-08-19T20:50:08.5766667+00:00

    @SQLDev

    Yes, SQL Server 2022, a new feature called Contained Availability Groups was introduced. This is essentially a unique form of Availability Group that handles server-level elements required by databases within an Availability Group to maintain consistency across all replicas. These elements can include logins or SQL Server Agent jobs. By utilizing Contained Availability Groups, the need to recreate and remove server-level objects across secondary replicas is eliminated.

    Since logins and SQL Server Agent jobs are created in the master and msdb databases, respectively, Contained Availability Groups will have their own copies of master and msdb. The server-level objects that exist within the Contained Availability Groups are limited within its boundaries. What that means is only the logins and SQL Server Agent jobs created within the context of the Contained Availability Groups will be created in those system databases.

    It will be look like below-

    User's image

    Thank you!


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.