Forum Discussion
ladislavdvorakasseco
Jul 22, 2024Copper Contributor
SQL Server mirroring between Linux SQL Server instance and Windows Server SQL Server instance
Dear all,
is it recommended / possible to use SQL Server Mirroring between Windows Server instance of SQL Server and Linux instance of SQL Server ? Version of SQL Server both of them is SQL Server 2019.
Thank you for any advice or hint.
Ladislav Dvorak
- SivertSolemIron Contributor
ladislavdvorakasseco
Hi,
First, I'd like to warn that the technology referred to as "Database mirroring" in MS SQL in specific is not recommended for new deployments, as it's on its way out.See the note on the top of this page:
Database Mirroring (SQL Server) - SQL Server Database Mirroring | Microsoft LearnFor database replication work, MS instead recommend Availability Groups.
What is an Always On availability group? - SQL Server Always On | Microsoft Learn
They may not perform in the way you want, especially out of the box.
Availability groups on Windows rely on the Windows Server feature Windows Server Failover Cluster, whereas Availability groups on Linux are either clustered using pacemaker
Availability groups for SQL Server on Linux - SQL Server | Microsoft Learn
It is possible, and even mentioned in the previous article, to have availability groups (or Distributed availability Groups) crossing OS boundaries. Linked is the section describing that layout.
Availability groups for SQL Server on Linux - SQL Server | Microsoft Learn
Note that using "Cluster type NONE", which allows an Availability Group to contain SQL Server on both Windows and Linux, only support manual failover.
The second supported scenario is to have both a Windows WSFC cluster and a Linux Pacemaker cluster, and a distributed AG straddling them.
This would also require manual intervention to switch the primary/active between OSes.
Also, make sure you're not reliant on any of the features mentioned in the "Unsupported features and services" section. SQL Server on Linux does not have feature parity with Windows.
Editions and supported features of SQL Server 2019 - Linux - SQL Server | Microsoft Learn