Skip to content

Exponential CMS

Microsoft SQL Server and Azure SQL

Run Exponential on SQL Server 2017 to 2025 or Azure SQL with the kernel's own driver, new in 6.0.15.

From Exponential 6.0.15 the kernel has its own SQL Server driver, written anew under the GNU GPL (version 2 or later), on Linux and on Windows. It is the choice for organizations standardized on Microsoft's database.

Supported servers

  • SQL Server 2017 (the floor), 2019, 2022 and 2025.
  • Azure SQL Database and Azure SQL Managed Instance; transient errors are retried.
  • Not supported: Azure SQL Edge (retired by Microsoft on September 30, 2025) and SQL Server 2016 or older.

PHP extensions

One of these, chosen automatically in this order: Microsoft's sqlsrv (recommended), Microsoft's pdo_sqlsrv, PHP's PDO_ODBC with Microsoft's ODBC Driver 17 or 18, or pdo_dblib over FreeTDS as a fallback.

Prepare the database

The installer does not create the database on SQL Server. Create it first, with a UTF-8 collation (for example Latin1_General_100_CI_AS_SC_UTF8 on SQL Server 2019 and newer) and with READ_COMMITTED_SNAPSHOT on, so readers never wait for writers:

ALTER DATABASE [site] SET READ_COMMITTED_SNAPSHOT ON

Install

EXP_INSTALL_DB_PASSWORD=secret ./console exp:install --apply --db=sqlserver --db-host=sql1.example.com --db-port=1433 \
  --db-name=site --db-user=exponential --db-encrypt=yes

--db=mssql and --db=sqlsrv mean the same. --db-encrypt takes yes (the default), no or strict (SQL Server 2022 and newer); --db-trust-server-certificate accepts a self-signed certificate, for a test server on a network you trust. The kickstarter offers the same with Type=sqlserver in kickstart.ini.

Settings

[DatabaseSettings]
DatabaseImplementation=sqlserver
Server=sql1.example.com
Port=1433
User=exponential
Database=site

More options live in site.ini [SQLServerSettings], all with defaults: the layer, the ODBC driver, Encrypt, TrustServerCertificate, MultiSubnetFailover, ApplicationIntent, timeouts, deadlock retries and the collation. Connection pooling is off by default, and should stay off where processes fork, such as under Velocity.

Read replicas and clusters

  • Read replicas: with UseSlaveServer=enabled and the Always On listener or a secondary as the replica, plain reads of anonymous visitors go there with read-only intent; writes and signed-in users stay on the primary.
  • Clusters: the DFS file handler keeps its file index in SQL Server too (backend dfssqlserver). See Clustering and DFS.

Tested in the project's automated runs on SQL Server 2017, 2019, 2022 and 2025 with PHP 8.1 to 8.5. Back to Database support.

Last updated 11/26/2026. Something missing or wrong? Write to info@se7enx.com.