SQL Server 2019 Developer
Overview
This guide shows you how to deploy and configure SQL Server 2019 Developer on Linux, using the SecureAnyCloud AMI from the AWS Marketplace. Developer edition includes all the features of Enterprise edition, but it is licensed for development and test databases only. That makes it a good fit for building and testing applications without production licensing costs.
What you get:
- SQL Server 2019 Developer 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 for keeping 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 Developer includes every feature available in Enterprise edition, including advanced analytics, in-memory technologies and Always On availability groups. It is free to use for development, testing and QA environments. Do not use it in a production environment.
Prerequisites
Before you launch this AMI, make sure you have:
- An active AWS account
- An active subscription to the SQL Server 2019 Developer listing on AWS Marketplace
- An EC2 key pair for SSH access
- Familiarity with EC2 instance management and SSH
Recommended instance type. Use t3.medium (2 vCPU, 4 GB RAM) or larger. SQL Server benefits from additional memory for caching and query performance.
Minimum requirements. 1 vCPU, 2 GB RAM and 6 GB of disk space.
Launch the AMI
- Go to the AWS Marketplace and search for "SQL Server 2019 Developer SecureAnyCloud".
- Choose Continue to Subscribe, accept the terms, then choose Continue to Configuration.
- Select your preferred Region and Software Version.
- Choose Continue to Launch.
- Choose Launch through EC2 for full control over instance configuration.
- Select your instance type (
t3.mediumis recommended). - Configure storage, and make sure there is enough disk space for your database workloads.
- Configure your Security Group with the inbound rules below.
Add these inbound rules:
- Port 22, TCP, source: your IP. Purpose: SSH access.
- Port 1433, TCP, source: your IP. Purpose: 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.
Finally, select your EC2 key pair and launch the instance.
Connect via SSH
When your instance is running and has passed both status checks (2/2), connect over 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.
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 with:
cat /stage/scripts/mssql_admin_password.logSave this password securely. You need it to connect to SQL Server.
Connect to SQL Server
Use the sqlcmd command-line tool to connect to the local SQL Server instance:
sqlcmd -S localhost -U SAWhen prompted, enter the SA password you retrieved in Step 3.
Expected output:
1>You are connected to SQL Server and can run T-SQL queries.
Create a Database and Table
Create a new database:
CREATE DATABASE MyAppDB; GOSwitch to the new database:
USE MyAppDB; GOCreate a table:
CREATE TABLE Users ( UserID INT IDENTITY(1,1) PRIMARY KEY, Name NVARCHAR(100), Email NVARCHAR(255), CreatedAt DATETIME DEFAULT GETDATE() ); GOInsert data:
INSERT INTO Users (Name, Email) VALUES ('John Doe', 'john@example.com'); GOQuery data:
SELECT * FROM Users; GOType QUIT to exit the sqlcmd shell.
Server Components
The image includes one server component: SQL Server 2019 Developer, with its software home at /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
The image uses these mount points:
- / (38 GB): the root filesystem
- /boot (2 GB): operating system kernel files
- /opt/mssql (9.8 GB): the SQL Server installation directory
Managing the SQL Server Service
systemd manages SQL Server, and the service starts automatically on boot.
Check the service status:
systemctl status mssql-serverStop SQL Server:
systemctl stop mssql-serverStart SQL Server:
systemctl start mssql-serverRestart SQL Server:
systemctl restart mssql-serverScripts and Log Files
All of these files are in /stage/scripts:
- initial_boot_update.sh updates the OS with the latest packages on first boot.
- initial_boot_update.log is the output log for the boot update script.
- mssql_admin_password.log 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.shTroubleshooting
Cannot connect over 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 is 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 - Make sure the instance has at least 2 GB 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 does not work
- 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-serverHigh memory usage
- SQL Server is designed to use available memory for caching.
- Configure memory limits with
mssql-conf:
sudo /opt/mssql/bin/mssql-conf set memory.memorylimitmb 2048
sudo systemctl restart mssql-serverSecurity 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 one.
- Create application-specific logins. Do not use the SA account for application connections. Create dedicated logins with the minimum required permissions.
- 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.
- 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 or restricting access to
/stage/scripts/mssql_admin_password.log.
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 Developer with 24/7 support from SecureAnyCloud.
View on Marketplace
Need Help?
Our support team is available 24/7.
sales@secureanycloud.com