- Lab
- A Cloud Guru
Deploying a SQL Server VM in Azure
Starting with SQL Server 2017, we can run Microsoft's enterprise-grade RDBMS on Linux. Combined with the power of the Azure Marketplace, this gives us the ability to quickly spin up database infrastructure in a minimal amount of time. In this hands-on lab, we quickly meet business demands for database infrastructure by utilizing images in the Azure Marketplace.
Path Info
Table of Contents
-
Challenge
Log In to the Azure Portal
Log in to the Azure Portal using the provided credentials.
-
Challenge
Create a SQL Server on Linux VM from the Azure Marketplace
- On the home page, click Create a resource.
- Search for "SQL Server 2017" and hit enter.
- Filter the search by the criteria Operating system -> Redhat and Publisher -> Microsoft.
- Click on Free SQL Server License: SQL Server 2017 Developer on Red Hat Enterprise Linux 7.4 (RHEL).
- Click Create.
- Select the resource group created by the lab.
- Provide a Virtual machine name.
- Click Change size under Size.
- Choose "See all sizes" and scroll down to the B2s row and select it.
- Choose Password for the Authentication type, then provide a Username and Password.
- Click Allow selected ports.
- Select SSH (22).
- Click Review + create.
- Verify everything looks good and click Create.
- Once the deployment is complete, click Go to resource.
-
Challenge
Connect to the VM
- On the resource page, click Connect at the top.
- Use the provided information to SSH to the server.
-
Challenge
Change the SA Password
- Stop the
mssql-server
service. sudo systemctl stop mssql-server - Change the SA password. sudo /opt/mssql/bin/mssql-conf set-sa-password
- Restart the
mssql-server
service. sudo systemctl start mssql-server
- Stop the
-
Challenge
Allow Incoming Connections
If we'd like outside applications to connect to our database, we must follow these steps.
- On our resource page, click Networking in the left pane.
- Click Add inbound port rule.
- Leave all of the defaults, but change Destination port ranges to "1433".
- Change Name to "Port_1433".
- Click Add.
Use the following commands to open the firewall port on the VM.
sudo firewall-cmd --zone=public --add-port=1433/tcp --permanent sudo firewall-cmd --reload
Success! We've created a SQL Server backend that the development team can utilize with minimal time and configuration!
What's a lab?
Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.
Provided environment for hands-on practice
We will provide the credentials and environment necessary for you to practice right within your browser.
Guided walkthrough
Follow along with the author’s guided walkthrough and build something new in your provided environment!
Did you know?
On average, you retain 75% more of your learning if you get time for practice.