Deployment guide

SQL Server 2019 Standard

Overview

SQL Server 2019 Standard is the core database platform for production workloads. It provides essential database management and business intelligence capabilities with straightforward licensing.

This guide covers deploying and configuring SQL Server 2019 Standard on Linux, using the SecureAnyCloud AMI from the AWS Marketplace.

What you get:

  • SQL Server 2019 Standard edition installed at /opt/mssql
  • SQL Server database port 1433 preconfigured and listening on boot
  • An SA (System Administrator) account with a randomly generated password
  • The sqlcmd command-line tool for database interaction
  • An OS package update script to keep the system current
  • AWS CLI v2 for AWS service integration
  • Systems Manager Agent (SSM) for remote management
  • CloudWatch Agent for monitoring
  • Latest security patches applied at build time
  • 24/7 SecureAnyCloud support with a guaranteed 24-hour response SLA

Edition notes: SQL Server 2019 Standard is designed for production workloads with moderate resource requirements. It supports up to 128 GB of buffer pool memory and the lesser of 4 sockets or 24 cores, with no per-database size limit.

Standard includes core database features, basic high availability through log shipping and database mirroring, and reporting services. For workloads that need Always On availability groups, in-memory OLTP or advanced analytics, consider Enterprise edition.

Prerequisites

Before you launch this AMI, make sure you have:

  • An active AWS account
  • An active subscription to the SQL Server 2019 Standard listing on AWS Marketplace
  • An EC2 key pair for SSH access
  • Familiarity with EC2 instance management and SSH

Recommended instance type: m5.xlarge (4 vCPU, 16 GB RAM) or larger. Standard edition production workloads benefit from enough memory for query caching and processing.

Minimum requirements: 1 vCPU, 2 GB RAM and 6 GB of disk space.

1

Launch the AMI

  • In the AWS Marketplace, search for "SQL Server 2019 Standard SecureAnyCloud".
  • Choose Continue to Subscribe, accept the terms, then choose Continue to Configuration.
  • Select your Region and Software Version.
  • Choose Continue to Launch.
  • Choose Launch through EC2 for full control over instance configuration.
  • Select your instance type. m5.xlarge is recommended for production.
  • Configure storage. Provision gp3 volumes that are large enough for your database workloads. Separate EBS volumes for data and log files can improve performance.
  • Configure your Security Group with the following inbound rules:

Port Protocol Source Purpose

22 TCP Your IP SSH access

1433 TCP Your IP SQL Server database port

Important: Restrict port 1433 to trusted application servers or your IP only. Never expose the SQL Server port to the public internet.

  • Select your EC2 key pair and launch the instance.
2

Connect via SSH

When your instance is running and has passed both status checks (2/2), connect with SSH:

ssh -i your-key.pem ec2-user@<public-ip-address>

To switch to the root user:

sudo su -

Important: Wait for the EC2 instance to reach 2/2 successful status checks before you connect. Early connection attempts can fail with "Permission denied" errors while the instance is still initializing.

3

Retrieve the SA password

The SA (System Administrator) password is randomly generated at build time and stored in a log file on the instance. Retrieve it:

cat /stage/scripts/mssql_admin_password.log

Store the password securely. You need it to connect to SQL Server.

4

Connect to SQL Server

Use the sqlcmd command-line tool to connect to the local SQL Server instance:

sqlcmd -S localhost -U SA

When prompted, enter the SA password that you retrieved in Step 3.

Expected output:

1>

You are now connected to SQL Server and can run T-SQL queries.

5

Create a database and table

Create a new database:

CREATE DATABASE MyAppDB; GO

Switch to the new database:

USE MyAppDB; GO

Create a table:

CREATE TABLE Users ( UserID INT IDENTITY(1,1) PRIMARY KEY, Name NVARCHAR(100), Email NVARCHAR(255), CreatedAt DATETIME DEFAULT GETDATE() ); GO

Insert data:

INSERT INTO Users (Name, Email) VALUES ('John Doe', 'john@example.com'); GO

Query the data:

SELECT * FROM Users; GO

Enter QUIT to exit the sqlcmd shell.

Server Components

Component Software Home

SQL Server 2019 Standard /opt/mssql

Note: On first boot, the automatic OS package update script can update component versions if it finds newer versions in the system package repositories.

Filesystem Layout

Mount Point Size Description

/ 38 GB Root filesystem

/boot 2 GB Operating system kernel files

/opt/mssql 9.8 GB SQL Server installation directory

Managing the SQL Server Service

systemd manages SQL Server, and the service starts automatically on boot.

Check service status:

systemctl status mssql-server

Stop SQL Server:

systemctl stop mssql-server

Start SQL Server:

systemctl start mssql-server

Restart SQL Server:

systemctl restart mssql-server

Scripts and Log Files

Script/Log Path Description

initial_boot_update.sh /stage/scripts Updates the OS with the latest packages on first boot

initial_boot_update.log /stage/scripts Output log for the boot update script

mssql_admin_password.log /stage/scripts Contains the randomly generated SA password

On Startup

An OS package update script runs on first boot to bring the image fully up to date. To disable it, remove the script and its crontab entry:

rm -f /stage/scripts/initial_boot_update.sh crontab -e
# Delete the following line, save and exit: @reboot /stage/scripts/initial_boot_update.sh

Troubleshooting

Cannot connect via SSH

  • Wait for the EC2 instance to reach 2/2 status checks.
  • Verify that your security group allows port 22 from your IP.
  • Confirm that you are using the correct key pair and connecting as ec2-user.
  • Check the instance system log in the AWS Console for boot errors.

SQL Server service not running

  • Check the service status: systemctl status mssql-server
  • Review the SQL Server error log: cat /var/opt/mssql/log/errorlog
  • Verify that there is enough disk space: df -h /opt/mssql
  • Ensure that the instance has at least 2 GB of RAM.

Cannot connect to SQL Server on port 1433

  • Verify that the service is running: systemctl status mssql-server
  • Check that the security group allows port 1433 from your IP.
  • Test local connectivity: sqlcmd -S localhost -U SA
  • Check that SQL Server is listening: ss -tlnp | grep 1433

SA password not working

  • Retrieve the password again: cat /stage/scripts/mssql_admin_password.log
  • Make sure you copy the entire password without extra whitespace.
  • If needed, reset the SA password with mssql-conf:
sudo systemctl stop mssql-server
sudo /opt/mssql/bin/mssql-conf set-sa-password
sudo systemctl start mssql-server

High memory usage

  • By design, SQL Server Standard can use up to 128 GB of buffer pool memory.
  • Configure memory limits with mssql-conf:
sudo /opt/mssql/bin/mssql-conf set memory.memorylimitmb 4096
sudo systemctl restart mssql-server
  • Ensure that the instance type provides enough RAM for your workload.

Security Recommendations

  • Restrict port access. Allow SQL Server port 1433 only from trusted application servers or specific IP addresses.
  • Change the SA password. After your first login, replace the generated password with a strong, unique password.
  • Create application-specific logins. Avoid using the SA account for application connections. Create dedicated logins with the minimum permissions they need.
  • Enable encrypted connections. Configure SQL Server to use TLS/SSL for client connections.
  • Keep SQL Server updated. Apply cumulative updates and security patches when they are available.
  • Monitor access. Review the SQL Server error logs regularly for failed login attempts.
  • Configure backups. Set up regular database backups with SQL Server Agent or AWS Backup.
  • Use AWS security features. Use VPC security groups, NACLs and private subnets to restrict network access.
  • Secure the password file. After you retrieve the SA password, consider removing the file or restricting access to /stage/scripts/mssql_admin_password.log.
  • Enable high availability. Configure log shipping or database mirroring, which are Standard edition features.

Support

If you have any issues with this product, contact SecureAnyCloud support:

  • Email: sales@secureanycloud.com
  • Website: secureanycloud.com
  • Support hours: 24/7, with a guaranteed 24-hour response SLA

Deploy on AWS

Launch SQL Server 2019 Standard with 24/7 support from SecureAnyCloud.

View on Marketplace

Need Help?

Our support team is available 24/7.

sales@secureanycloud.com