Skip to content

Latest commit

 

History

History

task_025_licence_and_version

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 

Licence And Version

SELECT
 SERVERPROPERTY('MachineName') AS ComputerName,
 SERVERPROPERTY('ServerName') AS InstanceName,
 SERVERPROPERTY('Edition') AS Edition,
 SERVERPROPERTY('ProductVersion') AS ProductVersion,
 SERVERPROPERTY('ProductLevel') AS ProductLevel;
GO
ComputerName InstanceName Edition ProductVersion ProductLevel
sqlEnterprise sqlEnterprise Enterprise Edition (64-bit) 16.0.4075.1 RTM

MSSQL

Reddit Threads

Other Threads

Docker Commands

The Docker run command for SQL Server involves specifying the edition you want to use through the MSSQL_PID environment variable. Below are the Docker run commands for various editions of SQL Server:

1. Enterprise Edition

docker run --rm \
-e "ACCEPT_EULA=Y" \
-e "MSSQL_SA_PASSWORD=Password12345" \
-e "MSSQL_PID=Enterprise" \
-e "MSSQL_AGENT_ENABLED=1" \
-p 1433:1433 --name sqlEnterprise --hostname sqlEnterprise \
-d mcr.microsoft.com/mssql/server:2022-latest

2. Standard Edition

docker run --rm \
-e "ACCEPT_EULA=Y" \
-e "MSSQL_SA_PASSWORD=Password12345" \
-e "MSSQL_PID=Standard" \
-e "MSSQL_AGENT_ENABLED=1" \
-p 1433:1433 --name sqlStandard --hostname sqlStandard \
-d mcr.microsoft.com/mssql/server:2022-latest

3. Express Edition

docker run --rm \
-e "ACCEPT_EULA=Y" \
-e "MSSQL_SA_PASSWORD=Password12345" \
-e "MSSQL_PID=Express" \
-e "MSSQL_AGENT_ENABLED=1" \
-p 1433:1433 --name sqlExpress --hostname sqlExpress \
-d mcr.microsoft.com/mssql/server:2022-latest

4. Developer Edition

docker run --rm \
-e "ACCEPT_EULA=Y" \
-e "MSSQL_SA_PASSWORD=Password12345" \
-e "MSSQL_PID=Developer" \
-e "MSSQL_AGENT_ENABLED=1" \
-p 1433:1433 --name sqlDeveloper --hostname sqlDeveloper \
-d mcr.microsoft.com/mssql/server:2022-latest

Notes

  • Ensure to replace "Password12345" with a strong password as per your security guidelines.
  • The MSSQL_PID environment variable is used to specify the edition of SQL Server to run.
  • Ensure that you comply with licensing terms for the edition you are using, especially for production use.
  • Always store sensitive data like passwords securely, consider using Docker secrets or environment variable files instead of hard-coding them into your commands or scripts.
  • Ensure that the port 1433 is not being used by another service on your host machine.
  • For production deployments, consider additional configuration for security, data persistence, and performance tuning.

Always refer to the official Microsoft documentation for the most accurate and up-to-date information.