Upgrade CU Patch on Linux Based SQL Server with Clusterless AlwaysOn

 

  1. Current Version of SQL Server.

Alwayson1 instance:

Alwayson2 instance:


Always on Status:

Primary: Alwayson1

Secondary: Alwayson2




  1.  Take backup of database before activity 

-- Full DB Backup

BACKUP DATABASE [TestDB1] TO DISK = '/var/opt/mssql/backup/TestDB1_2022.bak' WITH compression, stats=1



  1. Upgrade secondary SQL Server 2019 std from CU 13 to the latest CU 15.


Check the latest version available using below command:


root@alwayson2:# sudo apt -a list mssql-server


mssql-server/bionic 15.0.4198.2-10 amd64 [upgradable from: 15.0.4178.1-3]   -----latest version available CU 15

mssql-server/bionic 15.0.4188.2-3 amd64

mssql-server/bionic,now 15.0.4178.1-3 amd64 [installed,upgradable to: 15.0.4198.2-10]  -----current version in prod CU 13

mssql-server/bionic 15.0.4153.1-6 amd64

mssql-server/bionic 15.0.4138.2-1 amd64


root@alwayson2:# sudo apt-get update

Load the updated packages:

root@alwayson2:# sudo apt-cache show mssql-server

--Verify updated package of mssql server


Package: mssql-server

Priority: extra

Section: misc

Installed-Size: 1167498

Maintainer: Microsoft Data Platform Group <dpgswdist@microsoft.com>

Architecture: amd64

Version: 15.0.4198.2-10

Replaces: mssql-server-agent

Depends: libatomic1, libunwind8, libnuma1, libc6, adduser, libc++1, gdb, debconf, hostname, openssl (>= 1.0.1g), python3, libgssapi-krb5-2, libsss-nss-idmap0, gawk, sed, libpam0g, libldap-2.4-2, libsasl2-2, libsasl2-modules-gssapi-mit, tzdata

Conflicts: mssql-server-agent

Breaks: mssql-server-fts (<< 15)

Filename: pool/main/m/mssql-server/mssql-server_15.0.4198.2-10_amd64.deb



root@alwayson2:#sudo apt-get install mssql-server

Install the CU15 on Secondary server


During update the always on secondary replica will be in not sync mode


Recheck the sync status:

Now Always on secondary server will be in CU15:


  1. Failover to the Secondary server and upgrade the primary server



Check the always on sync status after failover: Alwayson2 will be primary server.


Update the alwayson1 server from CU 13 to latest CU 15:









Failback to the primary and check the always on status:




  1. Test the application connectivity and take confirmation.

Post a Comment