SQL Server editions
The bundled sqlserver service runs the official mcr.microsoft.com/mssql/server:2022-latest image. Which SQL Server
edition it runs is set by the MSSQL_PID variable, and that choice decides which Microsoft license applies to you. xrmd
never leaves it to the image's own default.
MSSQL_PID |
What it means for you |
|---|---|
Express (default) |
Free, also in production. It is capped: at most 10 GB per database (each organization is one database, so the cap applies per organization), about 1.4 GB of buffer-pool memory, and the lesser of one socket or four cores. Enough to try xrmverse and for small installations; plan a move to a licensed edition before an organization approaches the size cap. |
Developer |
All features, no caps, but licensed only for development and testing, not for production. |
Standard, EnterpriseCore, Enterprise |
Production editions that need a SQL Server license of your own. Microsoft documents Enterprise as the older per-user (Server + CAL) model and EnterpriseCore as the per-core one. |
a product key XXXXX-XXXXX-XXXXX-XXXXX-XXXXX |
The edition your key unlocks. |
xrmd accepts exactly these values (edition names in any case); anything else is refused (server init exit 2, any later
server command exit 5 naming MSSQL_PID).
Setting it.
xrmd server init --sql-edition <value>writesMSSQL_PIDto.env; without the option a new installation getsExpress.server init --forceover an existing.envkeeps the edition written there.- Later, edit
MSSQL_PIDin.envand runxrmd server up(orserver upgrade): the compose file is re-rendered from.env. The generated compose file requires the key (${MSSQL_PID:?…}), so Compose refuses to start when it is missing. - Repository compose file (
docker/docker-compose.yml): setMSSQL_PIDindocker/.env; when it is unset the service runsExpress. - Changing the edition of an instance that already holds data is an edition change of SQL Server, not an xrmd operation: check Microsoft's guidance first, and remember that Express refuses to grow a database past its cap.
Installations from before this setting. Until MSSQL_PID existed, the sqlserver service ran the image's default,
which is the Developer edition. So that the edition of an existing data volume never changes behind your back, server up, server upgrade and server org add|remove on a multi-organization .env without MSSQL_PID write
MSSQL_PID=Developer into it and keep running Developer; server init --force over such a .env does the same.
Whenever the edition is Developer these commands print, on stderr:
This installation runs the SQL Server Developer edition, which is not licensed for production. Set MSSQL_PID in .env (see README, "SQL Server editions").
Choose the edition you are licensed for and write it to .env to stop the warning. Legacy single-organization
installations (no XRMD_ORGS) are not changed. With the repository compose file, a mssql-data volume created
before this setting also ran Developer; set MSSQL_PID=Developer in docker/.env to keep it, or choose another edition.
External SQL Server. With server init --sql-connection there is no sqlserver service: the edition and its
license are those of your own SQL Server, and --sql-edition is refused (exit 2), as is MSSQL_PID in that .env.
License terms (ACCEPT_EULA)
The SQL Server image starts only with ACCEPT_EULA=Y, which states that you accept Microsoft's license terms for the
edition in MSSQL_PID and hold a valid license for it. xrmd never sets it for you:
xrmd server initwith the bundled SQL Server shows where the terms of the chosen edition are and asks at a terminal (default no).--accept-sql-server-eulaaccepts them without the question. Without a terminal and without the flag, init writes nothing (exit 2). Once accepted,ACCEPT_EULA=Yis in.envand the generated compose file reads it from there (${ACCEPT_EULA:?…}): Compose refuses to start without it.server init --forcekeeps an acceptedACCEPT_EULA.- An installation written before this setting has no
ACCEPT_EULAin.env.server up,server upgradeandserver org add|removeask the same question at a terminal, or take--accept-sql-server-eula(upandupgrade); otherwise they stop (exit 5) before anything changes and name the command to run. ACCEPT_EULAother thanYis refused (exit 5). With an external SQL Server (--sql-connection) there is nothing to accept: the flag is refused (exit 2) and.envhas no such key.- Repository compose file (
docker/docker-compose.yml): setACCEPT_EULA=Yindocker/.envyourself, after reading the terms; Compose refuses to start without it.
Where the terms are: Express, Microsoft's free production license;
Developer, the SQL Server downloads page; Standard,
Enterprise, EnterpriseCore and product keys, your license from Microsoft Licensing.
What ACCEPT_EULA=Y and MSSQL_PID express is explained in
running production editions in containers.
Sources (Microsoft Learn): editions and limits of SQL Server 2022,
the same for Linux,
MSSQL_PID values,
running production editions in containers.