how to Run SQL server Standard edition on Docker with license key

Easy Payment System - EPS 0 Reputation points
2025-02-01T08:26:33.2+00:00

I went to run SQL Server standard edition on docker-compose. I have applied the license on the compose environment variable but in query, it shows that LicenceType is disabled.

SELECT SERVERPROPERTY('LicenseType') as Licensetype, 
   SERVERPROPERTY('NumLicenses') as LicenseNumber,
   SERVERPROPERTY('productversion') as Productverion, 
   SERVERPROPERTY ('productlevel')as ProductLevel, 
   SERVERPROPERTY ('edition') as SQLEdition,@@VERSION as SQLversion

enter image description here

version: '3.8'

services:
  mssqlserver:
    image: mcr.microsoft.com/mssql/server:2022-latest
    container_name: mssql_server
    restart: unless-stopped
    ports:
      - "hostport:1433"
    environment:
      - ACCEPT_EULA=Y
      - MSSQL_PID=Standard
      - MSSQL_SA_PASSWORD=pass
      - MSSQL_LICENSE=license_key
    volumes:
      - hostpath:/var/opt/mssql/data
      - hostpath:/var/opt/mssql/log
      - hostpath:/var/opt/mssql/backup
      
    networks:
      - mssql_network


networks:
  mssql_network:
    driver: bridge
SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
14,438 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Erland Sommarskog 116.5K Reputation points MVP
    2025-02-01T09:53:27.6266667+00:00

    Yes, that is expected. From the documentation of serverproperty:

    User's image


  2. ZoeHui-MSFT 40,356 Reputation points
    2025-02-03T01:07:07.07+00:00

    Hi @Easy Payment System - EPS,

    For question regarding pricing / licensing please contact a Microsoft sales partner or licensing expert.

    Please call 1-800-426-9400, Monday through Friday, 6:00 A.M. to 6:00 P.M. (Pacific Time) to speak directly to a Microsoft licensing specialist. Or you can go to Volume Licensing Service Center support. Please choose region/language and choose to call or have web. People there will help you more effectively.

    Regards,

    Zoe Hui


    If the answer is helpful, please click "Accept Answer" and upvote it.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.