SQL Server 2025 Standard
Overview
Microsoft SQL Server 2025 is Microsoft's current relational database platform. It delivers Azure Arc enabled services out of the box, a query store that is on by default, intelligent query processing, ledger tables for tamper-evident audit, and accelerated database recovery on every edition. Standard Edition suits departmental workloads, smaller production databases, and teams that do not need the unlimited scale of Enterprise but still need a supported SQL Server on Linux.
The SecureAnyCloud image ships SQL Server 2025 Standard Edition on Ubuntu 24.04 on Azure. It is installed from the official Microsoft APT repository at packages.microsoft.com, pinned to Ubuntu 24.04 noble, and the Microsoft GPG key is verified at build time. Every fresh VM gets its own SA password, so no two VMs share a password and no password is baked into the image.
Bring your own license. This image contains SQL Server 2025 Standard Edition binaries. The Standard software license is NOT included. Apply your own Standard product key on first login. Without a product key, Standard features run in evaluation mode for 180 days. After the evaluation period expires, you must apply a valid Standard license to keep the service operational.
What you get:
- Microsoft SQL Server 2025 Standard Edition from packages.microsoft.com
- mssql-tools18, including sqlcmd and bcp for database administration
- A listener on TCP port 1433 on every interface by default
- Per-VM SA and SecureAnyCloud passwords generated on first boot and written to /stage/scripts/mssql-credentials.log. On every fresh VM, mssql-firstboot.service replaces the build-time SA password with a strong random value, creates the default SecureAnyCloud database, provisions a SecureAnyCloud SQL login with the db_owner role on that database and removes the build-time memory cap
- Systemd service
mssql-server.servicefor automatic startup on boot - Systemd oneshot
mssql-firstboot.servicefor idempotent per-VM credential rotation - Ubuntu 24.04 LTS base with the latest security patches applied at build time
- Azure Linux Agent for cloud integration and SSH key injection
- 24/7 SecureAnyCloud support with a guaranteed 24-hour response SLA
Prerequisites
Before you deploy this image, make sure you have:
- An active Azure subscription
- A subscription to the SQL Server 2025 Standard on Ubuntu 24.04 listing on the Azure Marketplace
- A valid SQL Server 2025 Standard product key for bring-your-own-license activation
- An SSH public key for virtual machine authentication
- Familiarity with Azure virtual machine management and SSH
- A virtual network and subnet in the target region
Recommended virtual machine size: Standard_D2s_v5 (2 vCPU, 8 GB RAM) or larger. Standard Edition supports up to 24 cores and 128 GB buffer pool RAM. For typical departmental workloads, Standard_D4s_v5 (4 vCPU, 16 GB RAM) is a comfortable starting point with room to grow.
Deploy the Virtual Machine from the Azure Portal
In the Azure Portal, go to the Marketplace, search for SQL Server 2025 Standard, and select the SecureAnyCloud publisher entry. Select Create to begin the wizard.
On the Basics tab, choose your subscription, target resource group and region. Set the virtual machine name. Choose SSH public key as the authentication type, set the username to a name of your choice (the examples below use azureuser), and paste your SSH public key. Standard_D2s_v5 is the recommended starting size.
On the Disks tab, set the OS disk type to Standard SSD or Premium SSD. SQL Server data lives at /var/opt/mssql/data on the root disk by default. For production workloads, attach a separate Premium SSD data disk and bind mount it over /var/opt/mssql/data before you start the service.
On the Networking tab, select your existing virtual network and subnet. Attach a network security group that allows inbound TCP 22 from your management IP range. Allow inbound TCP 1433 only from application server subnets or the virtual network CIDR. Do not expose port 1433 to the public internet. The SA password is written in plain text on the virtual machine by design, so you can read it without a second trip. An internet-exposed SQL Server port would make brute-force attacks trivial.
On the Management, Monitoring and Advanced tabs, the defaults are appropriate. Choose Review + create, wait for validation to pass, then choose Create. Deployment takes around two minutes.
Deploy the Virtual Machine from the Azure CLI
To deploy from the command line, accept the Marketplace terms once, then deploy from the Marketplace image URN:
RG="mssql-prod" LOCATION="eastus" VM_NAME="mssql-01" ADMIN_USER="azureuser" IMAGE_URN="sac1647283583153:mssql-2025-standard-ubuntu-24-04:default:latest" SSH_KEY="$(cat ~/.ssh/id_rsa.pub)" az group create --name "$RG" --location "$LOCATION" az network vnet create \
--resource-group "$RG" \
--name mssql-vnet \
--address-prefix 10.80.0.0/16 \
--subnet-name mssql-subnet \
--subnet-prefix 10.80.1.0/24 az network nsg create --resource-group "$RG" --name mssql-nsg az network nsg rule create \
--resource-group "$RG" --nsg-name mssql-nsg \
--name allow-ssh-mgmt --priority 100 \
--source-address-prefixes "<your-mgmt-cidr>" \
--destination-port-ranges 22 --access Allow --protocol Tcp az network nsg rule create \
--resource-group "$RG" --nsg-name mssql-nsg \
--name allow-sql-vnet --priority 110 \
--source-address-prefixes VirtualNetwork \
--destination-port-ranges 1433 --access Allow --protocol Tcp
# Accept the Marketplace terms once per subscription (required before the first CLI deploy)
az vm image terms accept --urn sac1647283583153:mssql-2025-standard-ubuntu-24-04:default:latest
az vm create \
--resource-group "$RG" \
--name "$VM_NAME" \
--image "$IMAGE_URN" \
--size Standard_D2s_v5 \
--admin-username "$ADMIN_USER" \
--ssh-key-values "$SSH_KEY" \
--nsg mssql-nsg \
--vnet-name mssql-vnet \
--subnet mssql-subnet \
--storage-sku Premium_LRS \
--location "$LOCATION"Connect to the Virtual Machine
Once the virtual machine is running, SSH in. Use the private IP address from inside the virtual network, or the public IP if you have configured a bastion or direct management access. The default admin user is azureuser.
ssh azureuser@<vm-ip>Confirm the Service is Running
The mssql-firstboot.service runs automatically on first boot and completes within about 90 seconds. By the time your SSH session is open, first boot is typically already done. Confirm the service status:
sudo systemctl status mssql-server.service --no-pagerThe output should show active (running). Confirm that the first-boot sentinel exists:
sudo test -f /var/opt/mssql/.firstboot-done && echo FIRSTBOOT_DONEConfirm that the TCP listener is bound on port 1433:
sudo ss -tln | grep 1433Retrieve the SA and SecureAnyCloud Passwords
The SA and SecureAnyCloud passwords are randomly generated on this specific virtual machine and written to a root-only file. Read them with:
sudo cat /stage/scripts/mssql-credentials.logThe output contains lines similar to:
SA_USER=sa SA_PASSWORD=<SA_PASSWORD> SAC_USER=sac SAC_PASSWORD=<SAC_PASSWORD> SAC_DATABASE=sacStore the values in your secret store. You can shred the credentials file once the passwords are saved. Keeping it root-protected at mode 0600 is also a reasonable default for the life of the virtual machine.
Connect Locally with sqlcmd
The mssql-tools18 package installs sqlcmd at /opt/mssql-tools18/bin/sqlcmd. Verify that the binary is on PATH:
sudo ls -l /opt/mssql-tools18/bin/sqlcmdConnect to the server as SA, reading the password directly from the credentials file:
SA_PASS=$(sudo awk -F= '/^SA_PASSWORD=/{print $2}' /stage/scripts/mssql-credentials.log) /opt/mssql-tools18/bin/sqlcmd -S localhost -U sa -P "$SA_PASS" -C -Q "SELECT @@VERSION;"The server reports Microsoft SQL Server 2025.
Confirm the Standard Edition
Confirm the running edition is Standard:
SA_PASS=$(sudo awk -F= '/^SA_PASSWORD=/{print $2}' /stage/scripts/mssql-credentials.log) /opt/mssql-tools18/bin/sqlcmd -S localhost -U sa -P "$SA_PASS" -C -Q "SELECT SERVERPROPERTY('Edition') AS Edition;" -h -1 -WThe output shows Standard Edition (64-bit).
Apply Your Standard License Key
The image ships Standard binaries in evaluation mode. Apply your product key to activate the license. Replace YOUR_STANDARD_LICENSE_KEY with the key from your Microsoft Volume Licensing agreement:
sudo /opt/mssql/bin/mssql-conf setpid YOUR_STANDARD_LICENSE_KEY
sudo systemctl restart mssql-server.serviceAfter the restart, verify that the license is active:
SA_PASS=$(sudo awk -F= '/^SA_PASSWORD=/{print $2}' /stage/scripts/mssql-credentials.log) /opt/mssql-tools18/bin/sqlcmd -S localhost -U sa -P "$SA_PASS" -C -Q "SELECT SERVERPROPERTY('LicenseType') AS LicenseType;" -h -1 -WThe value PER_CORE confirms a perpetual Standard license. EVAL indicates that the 180-day evaluation period is still active.
Round-trip Test with sqlcmd
The SecureAnyCloud database and SecureAnyCloud login are ready to use from first boot. Run a round-trip query as the SecureAnyCloud user:
CL_PASS=$(sudo awk -F= '/^SAC_PASSWORD=/{print $2}' /stage/scripts/mssql-credentials.log) /opt/mssql-tools18/bin/sqlcmd -S localhost -U sac -P "$CL_PASS" -C -d sac -h -1 -W -Q "CREATE TABLE ##probe (id INT, val NVARCHAR(64)); INSERT INTO ##probe VALUES (1, N'sac-ok'); SELECT val FROM ##probe WHERE id=1; DROP TABLE IF EXISTS ##probe;"The output includes sac-ok. This confirms that the SecureAnyCloud user has the expected permissions on the SecureAnyCloud database.
Connect from a Remote Client
From any host inside the same virtual network that has sqlcmd or SQL Server Management Studio installed, connect on port 1433 with the SA or SecureAnyCloud credentials. A representative sqlcmd command from a remote client looks like this:
sqlcmd -S <private-ip>,1433 -U sa -P '<SA_PASSWORD>' -C -d sacSQL Server Management Studio and Azure Data Studio connect the same way, using the virtual machine's private IP and the SA or SecureAnyCloud credentials. From a management workstation outside the virtual network, use Azure Bastion or an SSH tunnel. Do not open port 1433 to the public internet.
Server Components
The image installs these components:
- SQL Server daemon: /opt/mssql/bin/sqlservr
- sqlcmd client: /opt/mssql-tools18/bin/sqlcmd
- bcp bulk copy utility: /opt/mssql-tools18/bin/bcp
- mssql-conf configuration tool: /opt/mssql/bin/mssql-conf
- SQL Server data directory: /var/opt/mssql/data/
- SQL Server log directory: /var/opt/mssql/log/
- Systemd unit: /lib/systemd/system/mssql-server.service
- First-boot systemd unit: /etc/systemd/system/mssql-firstboot.service
- First-boot script: /usr/local/sbin/mssql-firstboot.sh
- Credentials file: /stage/scripts/mssql-credentials.log
- First-boot sentinel: /var/opt/mssql/.firstboot-done
Inspect the running mssql-server package version:
dpkg -l mssql-server mssql-tools18 | awk '/^ii/{print $2, $3}'Filesystem Layout
The image uses this filesystem layout:
- / (32 GB): root filesystem, which includes /var/opt/mssql
- /boot (1 GB): operating system kernel files
- /var/opt/mssql/data (on root): SQL Server data directory
- /var/opt/mssql/log (on root): SQL Server transaction logs and error logs
For production workloads, attach a separate Premium SSD data disk, format it with xfs, and bind mount it over /var/opt/mssql/data before you start the service. Place the transaction log directory on a separate disk for IO isolation. This keeps database IO off the OS disk and allows independent resize and snapshot of the data and log volumes.
Managing the SQL Server Service
Systemd starts and stops SQL Server through the mssql-server.service unit.
Check service status:
sudo systemctl status mssql-server.service --no-pagerStop SQL Server:
sudo systemctl stop mssql-server.service && echo "mssql-server stopped"Start SQL Server:
sudo systemctl start mssql-server.service && echo "mssql-server started"Restart SQL Server:
sudo systemctl restart mssql-server.service && echo "mssql-server restarted"View the SQL Server error log:
sudo tail -n 50 /var/opt/mssql/log/errorlogTroubleshooting
Cannot connect to SQL Server on port 1433
- Verify that the service is running:
sudo systemctl status mssql-server.service - Verify that the listener is bound:
sudo ss -tln | grep 1433 - Check the error log:
sudo tail -n 50 /var/opt/mssql/log/errorlog - Confirm that the network security group allows TCP 1433 from your client source IP.
- Confirm that the virtual machine NIC is in the expected subnet with the network security group attached.
Authentication errors after connecting
- Read the SA password again:
sudo awk -F= '/^SA_PASSWORD=/{print $2}' /stage/scripts/mssql-credentials.log - Verify that the first-boot sentinel exists:
ls -la /var/opt/mssql/.firstboot-done. If it is absent,mssql-firstboot.servicedid not complete. Check its journal. - Check the first-boot journal:
sudo journalctl -u mssql-firstboot.service --no-pager
First-boot service did not run
- Check the first-boot service status:
sudo systemctl status mssql-firstboot.service --no-pager - Review the journal:
sudo journalctl -u mssql-firstboot.service --no-pager -n 100 - Verify that SQL Server started:
sudo systemctl status mssql-server.service - If SQL Server failed to start, check the error log:
sudo tail -n 100 /var/opt/mssql/log/errorlog
License evaluation expiry
- Run
SELECT SERVERPROPERTY('LicenseType')to see the current state.EVALmeans the 180-day evaluation is still active. - Apply your Standard product key:
sudo /opt/mssql/bin/mssql-conf setpid <your-product-key>, thensudo systemctl restart mssql-server.service - Confirm that the new state is
PER_COREafter the restart.
Service fails to start
- Check the systemd journal:
sudo journalctl -u mssql-server.service --no-pager -n 100 - Check the SQL Server error log:
sudo tail -n 100 /var/opt/mssql/log/errorlog - Check filesystem space:
df -h /var/opt/mssql - Verify data directory ownership:
sudo ls -la /var/opt/mssql/data | head. Files should be owned bymssql:mssql.
Security Recommendations
- Rotate the SA password on a schedule with
ALTER LOGIN [sa] WITH PASSWORD=N'<new-password>'; - Create application-specific logins with minimal privileges. Never connect application code as SA.
- Restrict port 1433 to trusted application server subnets only in your network security group.
- Disable the SA login once named logins are in place:
ALTER LOGIN [sa] DISABLE; - Back up regularly with native BACKUP DATABASE statements or SQL Agent jobs.
- Keep SQL Server updated by running
sudo apt-get update && sudo apt-get upgrade mssql-serverperiodically. The official packages.microsoft.com APT repository is already configured on this image. - Shred the credentials file once the passwords are stored in your secret store:
sudo shred -u /stage/scripts/mssql-credentials.log
Support and Licensing
SQL Server 2025 Standard Edition is Microsoft proprietary software. A valid per-core Standard license is required for production use after the 180-day evaluation period. Microsoft Server and SQL Server are registered trademarks of Microsoft Corporation.
SecureAnyCloud provides commercial support for this image separately from the upstream Microsoft product. Contact us at any time for support questions, architectural advice, capacity planning or migration help.
- Email: sales@secureanycloud.com
- Website: secureanycloud.com
- Support hours: 24/7 with a guaranteed 24-hour response SLA
Deploy on Azure
Launch SQL Server 2025 Standard on Ubuntu 24.04 with 24/7 support from SecureAnyCloud.
View on Marketplace
Need Help?
Our support team is available 24/7.
sales@secureanycloud.com
Deploy on Azure
Launch SQL Server 2025 Standard on Ubuntu 24.04 LTS on Azure with 24/7 support from SecureAnyCloud.
View this image
Need Help?
Our support team is available 24/7.
sales@secureanycloud.com
Overview
This image runs Microsoft SQL Server 2025 Standard Edition, the core relational engine for mid-tier production workloads, plus the new SQL Server 2025 engine features, within the Standard licensing envelope. SQL Server is the only workload on the image, so the platform stays lean and predictable. This guide covers the Standard delivery option. SQL Server 2025 is also offered in other editions on the same listing. See the SQL Server 2025 on AWS hub to compare and choose.
What you get:
- SQL Server installed from the official Microsoft APT repository for Ubuntu 24.04, with the
mssql-tools18package and thesqlcmdcommand-line utility preinstalled - A one-shot first-boot service that generates a fresh SA password, sets it with mssql-conf, re-applies the Standard edition, creates a dedicated SecureAnyCloud SQL login, removes the build-time memory cap and writes all credentials to /root/mssql-credentials.txt, a file that only the root user can read
- No shared or default credentials in the image
- SQL Server listening on port 1433 and starting on boot via systemd
- Standard edition limits: up to the lesser of 4 sockets or 32 cores, and 256 GB of buffer-pool memory. Basic Always On availability (a single secondary replica), backup compression and the new 2025 engine features are included. Multi-replica Always On AGs and in-memory OLTP are not
This is a headless image. SQL Server has no web interface. You administer it over SSH with the sqlcmd command-line tool and any compatible SQL Server client on port 1433, both covered below.
Prerequisites
Before you deploy this image, make sure you have:
- An Amazon Web Services account where you can launch EC2 instances
- IAM permissions to launch instances, create security groups and subscribe to AWS Marketplace products
- An EC2 key pair in the target Region for SSH access to the instance
- A VPC and subnet in the target Region, with a security group that allows inbound port 22 from your management network
- The AWS CLI (version 2) installed locally, if you plan to deploy from the command line
Recommended instance type: m5.xlarge (4 vCPU, 16 GB RAM) or larger.
Launch the Instance from the AWS Marketplace
Sign in to the AWS Management Console, open the EC2 service and select Launch instance. Under Application and OS Images, choose AWS Marketplace AMIs and search for SQL Server 2025. Select the SecureAnyCloud listing and choose Select. On the subscription summary, pick the SQL Server 2025 Standard on Ubuntu 24.04 delivery option and choose Continue.
Pick an instance type that suits your workload (see Prerequisites). Choose your EC2 key pair under Key pair (login). Under Network settings, select your VPC and subnet. Create or select a security group that allows inbound port 22 from your management network. Add port 1433 to the security group if you want external clients to connect to SQL Server directly. Leave the root volume at the default size or larger.
Select Launch instance. First-boot initialization generates the SA password and starts SQL Server. It takes a minute or two after the instance state becomes Running and the status checks pass.
Launch the Instance from the AWS CLI
The following command launches an instance from the SecureAnyCloud SQL Server 2025 Standard Marketplace AMI into an existing subnet and security group. Replace <ami-id> with the AMI ID shown on the Marketplace listing for the Standard delivery option and <key-name> with your EC2 key pair name. Replace <subnet-id> with your subnet ID and <security-group-id> with a security group that opens inbound port 22 (and optionally 1433 for external SQL connections).
aws ec2 run-instances \
--image-id <ami-id> \
--instance-type m5.xlarge \
--key-name <key-name> \
--subnet-id <subnet-id> \
--security-group-ids <security-group-id> \
--metadata-options HttpTokens=required \
--block-device-mappings '[{"DeviceName":"/dev/sda1","Ebs":{"VolumeSize":40,"VolumeType":"gp3"}}]' \
--tag-specifications 'ResourceType=instance,Tags=[{Key=Name,Value=mssql-01}]'On success, the command prints a JSON document. Note the instance ID. Once the instance is running, retrieve its public address:
aws ec2 describe-instances \
--instance-ids <instance-id> \
--query "Reservations[].Instances[].PublicIpAddress" \
--output textConnect over SSH
Connect over SSH with the key pair you selected and the public IP address from step 2. This delivery option is built on Ubuntu 24.04, so the SSH login user is ubuntu:
ssh ubuntu@<your-instance-ip>Wait until the instance has passed both EC2 status checks before you connect. The first-boot service runs before the SSH daemon is ready, so SQL Server is initialized by the time you can log in.
Retrieve the Generated SA Password
The first-boot service generates a fresh SA password for this instance and writes it, with the connection details, to /root/mssql-credentials.txt. The file is readable only by the root user. Display it from your SSH session:
sudo cat /root/mssql-credentials.txtThe file looks like this, with unique passwords on your instance:
# SQL Server 2025 Standard Edition -- Per-Instance Credentials
# Generated: Wed Jun 04 09:00:00 UTC 2026
# Instance IP: 3.86.159.217
# SA_USER=SA SA_PASSWORD=<set-at-first-boot> SAC_USER=sac SAC_PASSWORD=<set-at-first-boot> SAC_DATABASE=sac
#
# Connect: sqlcmd -S 3.86.159.217 -U SA -P 'Az6b3036366161212d18!fec2e071' -CKeep this file secure, because it contains the SA password for the SQL Server instance. The SecureAnyCloud login has db_owner membership on the SecureAnyCloud database and is suitable for application connections.
Connect to SQL Server with sqlcmd
The sqlcmd command-line utility is preinstalled at /opt/mssql-tools18/bin/sqlcmd. Connect to the local SQL Server instance using the SA password from the credentials file:
SA_PASS=$(sudo grep '^SA_PASSWORD=' /root/mssql-credentials.txt | cut -d= -f2-) /opt/mssql-tools18/bin/sqlcmd -S 127.0.0.1 -U SA -P "${SA_PASS}" -CThe -C flag trusts the server certificate, because the image uses a self-signed certificate. From the 1> prompt, you can run T-SQL statements. Type GO to execute a batch and exit to quit.
Verify the SQL Server version and confirm the Standard edition:
SA_PASS=$(sudo grep '^SA_PASSWORD=' /root/mssql-credentials.txt | cut -d= -f2-) /opt/mssql-tools18/bin/sqlcmd -S 127.0.0.1 -U SA -P "${SA_PASS}" -C -Q "SELECT @@VERSION"The output looks like this:
Microsoft SQL Server 2025 (RTM-CU5-GDR) (KB5095565) - 17.0.4050.1 (X64) May 15 2026 12:06:45 Copyright (C) 2025 Microsoft Corporation Standard Edition (64-bit) on Linux (Ubuntu 24.04.4 LTS) <X64>Licensing
This image installs SQL Server Standard Edition with evaluation licensing. To license it for production, stop the service, apply your 25-character product key and restart:
sudo systemctl stop mssql-server
sudo /opt/mssql/bin/mssql-conf set-edition
# enter your 25-character product key when prompted
sudo systemctl start mssql-serverConfirm the edition afterwards with the SERVERPROPERTY('Edition') query in Step 5.
Check the SQL Server Service
SQL Server runs as a systemd service. Check its status:
sudo systemctl status mssql-server --no-pagerThe output looks like this:
mssql-server.service - Microsoft SQL Server Database Engine Loaded: loaded (/usr/lib/systemd/system/mssql-server.service; enabled; preset: enabled) Active: active (running) since Wed 2026-06-04 09:00:35 UTC; 16s ago Docs: https://docs.microsoft.com/en-us/sql/linux Main PID: 6640 (sqlservr) Tasks: 87 Memory: 503.9M (peak: 503.9M) CPU: 8.057sManage the service with standard systemctl commands:
sudo systemctl stop mssql-server
sudo systemctl start mssql-server
sudo systemctl restart mssql-serverCreate a Database and Table
Connect to SQL Server and create a database with these commands:
SA_PASS=$(sudo grep '^SA_PASSWORD=' /root/mssql-credentials.txt | cut -d= -f2-) /opt/mssql-tools18/bin/sqlcmd -S 127.0.0.1 -U SA -P "${SA_PASS}" -C -Q "IF DB_ID('myapp') IS NULL CREATE DATABASE [myapp];" /opt/mssql-tools18/bin/sqlcmd -S 127.0.0.1 -U SA -P "${SA_PASS}" -C -d myapp -Q "IF OBJECT_ID('customers') IS NULL CREATE TABLE customers (id INT IDENTITY PRIMARY KEY, name NVARCHAR(100), email NVARCHAR(200), created_at DATETIME2 DEFAULT GETDATE()); INSERT INTO customers (name, email) VALUES ('Alice Smith', 'alice@example.com'); INSERT INTO customers (name, email) VALUES ('Bob Jones', 'bob@example.com'); SELECT id, name, email, created_at FROM customers;"The output looks like this:
id name email created_at -- ----------- ------------------ -------------------------- 1 Alice Smith alice@example.com 2026-06-04 09:05:00.0000000 2 Bob Jones bob@example.com 2026-06-04 09:05:00.1000000 (2 rows affected)Connect from a Remote Client
SQL Server listens on port 1433. To connect from a remote machine, add port 1433 to the instance security group inbound rules. Then connect with any SQL Server compatible client, such as SQL Server Management Studio, Azure Data Studio, DBeaver or sqlcmd on another machine:
/opt/mssql-tools18/bin/sqlcmd -S <your-instance-ip>,1433 -U SA -P "<SA_PASSWORD>" -CFor production deployments, consider enabling SSL/TLS with a trusted certificate. See the Microsoft documentation on SQL Server on Linux encryption.
Configuration with mssql-conf
The mssql-conf utility manages SQL Server configuration. View the current settings:
sudo /opt/mssql/bin/mssql-conf listSet the maximum server memory (replace 8192 with your desired limit in MB):
sudo /opt/mssql/bin/mssql-conf set memory.memorylimitmb 8192
sudo systemctl restart mssql-serverThe first-boot service removes the build-time memory cap automatically, so SQL Server starts with no explicit memory limit on your instance, within the edition's own buffer-pool ceiling. Set an explicit limit only if you need to share the host with other workloads.
Backup and Restore
Create the backup directory and back up the SecureAnyCloud database to a local file:
sudo mkdir -p /var/opt/mssql/backup
sudo chown mssql:mssql /var/opt/mssql/backup
SA_PASS=$(sudo grep '^SA_PASSWORD=' /root/mssql-credentials.txt | cut -d= -f2-) /opt/mssql-tools18/bin/sqlcmd -S 127.0.0.1 -U SA -P "${SA_PASS}" -C -Q \
"BACKUP DATABASE [sac] TO DISK = N'/var/opt/mssql/backup/sac.bak' WITH INIT, COMPRESSION;"Restore from a backup file:
SA_PASS=$(sudo grep '^SA_PASSWORD=' /root/mssql-credentials.txt | cut -d= -f2-) /opt/mssql-tools18/bin/sqlcmd -S 127.0.0.1 -U SA -P "${SA_PASS}" -C -Q \
"RESTORE DATABASE [sac] FROM DISK = N'/var/opt/mssql/backup/sac.bak' WITH REPLACE;"Troubleshooting
SQL Server will not start. Check the SQL Server error log:
sudo cat /var/opt/mssql/log/errorlog | tail -50Check the systemd journal:
sudo journalctl -u mssql-server -n 50 --no-pagerPort 1433 is not reachable from the internet. Check the EC2 security group inbound rules for the instance. Port 1433 must be open from your client IP or CIDR range.
Permission denied when reading credentials. The credentials file is owned by root with mode 600. Use sudo:
sudo cat /root/mssql-credentials.txtFirst-boot did not run. Check the first-boot service log:
sudo journalctl -u mssql-firstboot -n 50 --no-pager sudo cat /var/log/mssql-firstboot.logSecureAnyCloud Support
This image is supported by SecureAnyCloud. For technical assistance with SQL Server deployment, configuration, performance tuning, high availability, query optimization or database administration, contact support at sales@secureanycloud.com.
Support is available 24 hours a day, 7 days a week.
Deploy on AWS
Launch SQL Server 2025 Standard on AWS with 24/7 support from SecureAnyCloud.
View on Marketplace
Need Help?
Our support team is available 24/7.
sales@secureanycloud.com