senn-techsenn-tech
Infrastructure
Infrastructure2025-03-18· by Mag. (FH) Franz Senn

SQL Server 2022/2025 Self-Hosted — Not Just on Windows

SQL Server and Linux — this sounded like a contradiction in 2017. By 2026 it’s settled: a SQL Server runs as a Docker container as reliably as under Windows, without an operating system license.

SQL Server on Linux: What Works

docker run -e 'ACCEPT_EULA=Y' -e 'MSSQL_SA_PASSWORD=...' \
  -p 1433:1433 -d mcr.microsoft.com/mssql/server:2022-latest

The container brings the engine — Agent, Fulltext, Replication. SSIS, SSRS and SSAS remain Windows-only, but the database engine is fully functional.

An often overlooked advantage: the host OS does not need to be Windows. In Proxmox the container runs on a slim Linux VM, alongside other services — saving resources and licenses.

2022 → 2025: What’s New

SQL Server 2022 introduced Contained Availability Groups, improved query intelligence and Azure Arc integration. 2025 follows with performance and AI features — native vector search, improved query optimization for large datasets and T-SQL extensions for JSON path queries.

Licensing remains the familiar model: core-based or Server+CAL. Interesting for SMEs: the Developer Edition is free, fully functional and completely sufficient for non-production environments.

Backup & HA in Self-Hosted Operation

Simple and tested:

  • Backup: BACKUP DATABASE ... TO DISK, compressed, regularly via SQL Agent or Cron to NFS/ZFS share, there protected by snapshots and replication
  • High Availability: Availability Groups on Linux (Pacemaker), or — for less critical systems — Log Shipping to a standby

When SQL Server, When PostgreSQL?

If applications expect SQL Server (Dynamics, many .NET solutions) or if T-SQL expertise resides in the team, SQL Server is the more economical choice than a migration. For new projects without such dependencies, PostgreSQL is the more flexible alternative.

Conclusion

Self-hosted SQL Server pays off for workloads with existing Microsoft dependency — especially under Linux, where host OS license costs fall away.

FAQ
Do we still pay a Windows license for SQL Server on Linux?+

No. As a Docker container SQL Server runs on Linux without an operating system license — the host OS need not be Windows. The database licensing model stays familiar: core-based or Server plus CAL. Interesting for SMEs: the Developer Edition is free, fully functional, and completely sufficient for non-production environments.

What no longer works on Linux?+

The database engine is fully functional — Agent, Fulltext, and Replication come with the container. SSIS, SSRS, and SSAS remain Windows-only. If you need those services, you must run them separately under Windows. For pure database workloads this is irrelevant, and in Proxmox the container runs on a slim Linux VM alongside other services.

SQL Server or PostgreSQL — which fits us?+

If applications expect SQL Server, such as Dynamics or many .NET solutions, or if T-SQL expertise sits in the team, SQL Server is more economical than a migration. For new projects without such dependencies, PostgreSQL is the more flexible alternative. The decision therefore hinges on existing dependencies, not on general superiority.