Skip to main content

Microsoft SQL Server on Linux in Azure

Course

Intro Video

Photo of Landon Fowler

Landon Fowler

Database Training Architect II

Length

03:28:59

Difficulty

Intermediate

Videos

24

Hands-on Labs

4

Course Details

Microsoft SQL Server is a robust relational database management system with a number of intriguing features. Starting with SQL Server 2017, it is now available on many people's favorite operating system, Linux! In this course, we go over how to install, configure, and manage SQL Server on Linux. We do this within Azure and highlight some of the key benefits that Azure brings to the table for our SQL Server strategy.

Whether the student's an experienced SQL Server professional coming from a Windows background or a Linux guru getting into MSSQL for the first time, this course has something to offer.

Syllabus

Course Introduction

Getting Started

Course Introduction

00:01:30

Lesson Description:

Welcome to the Microsoft SQL Server on Linux in Azure course! I'm excited to go on this journey with you. In this video, we discuss the topic at hand and some of what to expect from the course. Feel free to reach out to me with any questions on the Linux Academy forums (@lfowler), community Slack (@Landon Fowler), or Twitter (lfowler_LA)!

About the Training Architect

00:00:47

Lesson Description:

Hi! I'd like to introduce myself. In this video, I give a very quick synopsis of who I am and my background. It's nice to meet you! Feel free to reach out to me with any questions on the Linux Academy forums (@lfowler), community Slack (@Landon Fowler), or Twitter (lfowler_LA)!

Database and RDBMS Introduction

00:04:14

Lesson Description:

In this video, we quickly review what a database and relational database management system are. This helps set our frame of mind for working with SQL Server on Linux. Feel free to reach out with any questions on the Linux Academy forums (@lfowler), community Slack (@Landon Fowler), or Twitter (lfowler_LA)!

Installation and Setup

Core Installation

SQL Server on Linux Overview

00:12:08

Lesson Description:

Let's take a minute to discuss SQL Server on Linux and what it has to offer. Why choose it instead of another RDBMS? Why run it on Linux instead of Windows? In this video, we attempt a fair look at how Microsoft's database offering is positioned in the Linux ecosystem. Feel free to reach out to me with any questions on the Linux Academy forums (@lfowler), community Slack (@Landon Fowler), or Twitter (lfowler_LA)! Blog on the Platform Abstraction Layer: https://cloudblogs.microsoft.com/sqlserver/2016/12/16/sql-server-on-linux-how-introduction/

CentOS Installation

00:13:03

Lesson Description:

In this video, we cover how to install SQL Server on the CentOS distribution of Linux. This includes installing the server and client components via yum, running initial configuration using mssql-conf, connecting via sqlcmd, and more. The commands used are in the interactive study guide and also listed below. Feel free to reach out to me with any questions on the Linux Academy forums (@lfowler), community Slack (@Landon Fowler), or Twitter (lfowler_LA)! Commands Server Components Download repository file

  sudo curl -o /etc/yum.repos.d/mssql-server.repo https://packages.microsoft.com/config/rhel/7/mssql-server-2017.repo
Install SQL Server
  sudo yum install -y mssql-server
Run setup
  sudo /opt/mssql/bin/mssql-conf setup
Verify service
  systemctl status mssql-server
Configure firewall
  sudo firewall-cmd --zone=public --add-port=1433/tcp --permanent
  sudo firewall-cmd --reload
Client Components Download repository file
  sudo curl -o /etc/yum.repos.d/msprod.repo https://packages.microsoft.com/config/rhel/7/prod.repo
Install tools
  sudo yum install -y mssql-tools unixODBC-devel
Update PATH
  echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bash_profile
  echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bashrc
  source ~/.bashrc
Connect
  sqlcmd -S localhost -U SA -P 'YourPassword'

Ubuntu Installation

00:09:31

Lesson Description:

In this video, we cover how to install SQL Server on the Ubuntu distribution of Linux. This includes installing the server and client components via apt-get, running initial configuration using mssql-conf, connecting via sqlcmd, and more. The commands used are in the interactive study guide and are listed below as well. Feel free to reach out to me with any questions on the Linux Academy forums (@lfowler), community Slack (@Landon Fowler), or Twitter (lfowler_LA)! Commands Server Components Configure repository

  wget -qO- https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
  sudo add-apt-repository "$(wget -qO- https://packages.microsoft.com/config/ubuntu/16.04/mssql-server-2017.list)"
Install SQL Server
  sudo apt-get update
  sudo apt-get install -y mssql-server
Run setup
  sudo /opt/mssql/bin/mssql-conf setup
Verify service
  systemctl status mssql-server --no-pager
Configure firewall
  sudo ufw allow 1433
Client Components Configure repository
  curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
  curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list | sudo tee /etc/apt/sources.list.d/msprod.list
Install tools
  sudo apt-get update 
  sudo apt-get install mssql-tools unixodbc-dev
Update PATH
  echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bash_profile
  echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bashrc
  source ~/.bashrc
Connect
  sqlcmd -S localhost -U SA -P 'YourPassword'

Using Azure Images

00:11:29

Lesson Description:

One of the advantages to working within Azure is the ability to utilize the Azure Marketplace. In this video, we explore how to use images from the Marketplace to simplify and accelerate our database delivery. Feel free to reach out to me with any questions on the Linux Academy forums (@lfowler), community Slack (@Landon Fowler), or Twitter (lfowler_LA)!

SQL Server on Linux Containers

00:05:46

Lesson Description:

Another way to quickly deploy SQL Server on Linux in a reliably consistent state is to utilize containers. In this video, we look at how to run SQL Server in a Docker container. Feel free to reach out to me with any questions on the Linux Academy forums (@lfowler), community Slack (@Landon Fowler), or Twitter (lfowler_LA)! Commands Pull the SQL Server image

sudo docker pull mcr.microsoft.com/mssql/server:2017-latest
Run the container
sudo docker run -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=<YourStrong@Passw0rd>" 
-p 1433:1433 --name sql1 
-d mcr.microsoft.com/mssql/server:2017-latest
Verify the container
sudo docker ps -a
Enter the container
sudo docker exec -it sql1 "bash"
Connect to SQL Server
/opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P "<YourNewStrong@Passw0rd>"

Azure SQL Database

00:08:06

Lesson Description:

Up to this point, we've discussed several options for how to install and configure SQL Server on Linux. In this video, we discuss the alternative of using a Platform as a Service (PaaS) option for SQL Server: Azure SQL Database. Feel free to reach out to me with any questions on the Linux Academy forums (@lfowler), community Slack (@Landon Fowler), or Twitter (lfowler_LA)!

Hands-on Labs are real live environments that put you in a real scenario to practice what you have learned without any other extra charge or account to manage.

Deploying a SQL Server VM in Azure

00:30:00

Configuring Additional Features

Configuring Connection Encryption

00:10:54

Lesson Description:

Securing connections between application or client machines and the SQL Server is a must, especially as data breaches become more prevalent. In this video, we discuss how to encrypt connections to SQL Server on Linux. Feel free to reach out to me with any questions on the Linux Academy forums (@lfowler), community Slack (@Landon Fowler), or Twitter (lfowler_LA)!

Configuring Full-Text Search

00:05:04

Lesson Description:

Full-Text Search allows us to query character-based data such as documents in SQL Server tables. In this video, we install the Full-Text Search service and use Azure Data Studio to demonstrate using it on a sample database. Feel free to reach out to me with any questions on the Linux Academy forums (@lfowler), community Slack (@Landon Fowler), or Twitter (lfowler_LA)!

Enabling and Using SQL Server Agent

00:06:45

Lesson Description:

SQL Server Agent is a valuable tool for running jobs against our databases. In this video, we cover how to enable SQL Server Agent on Linux and also demo using it to carry out a backup job. Feel free to reach out to me with any questions on the Linux Academy forums (@lfowler), community Slack (@Landon Fowler), or Twitter (lfowler_LA)!

Installing and Configuring SSIS

00:02:26

Lesson Description:

SQL Server Integration Services is a great tool for data integration and transformation. In this short video, we cover how to install and configure SSIS on Linux. Feel free to reach out to me with any questions on the Linux Academy forums (@lfowler), community Slack (@Landon Fowler), or Twitter (lfowler_LA)!

Hands-on Labs are real live environments that put you in a real scenario to practice what you have learned without any other extra charge or account to manage.

Configuring SQL Server on Linux in Azure

00:45:00

Updating

Installing Updates

00:05:58

Lesson Description:

A critical task for DBAs is making sure the correct version of SQL Server is installed, both for compatibility and security reasons. In this video, we take a look at how to verify which version of SQL Server is installed, downgrade to an earlier version, and upgrade to the newest one. Feel free to reach out to me with any questions on the Linux Academy forums (@lfowler), community Slack (@Landon Fowler), or Twitter (lfowler_LA)!

Administration

Authentication and Authorization

Instance-Level

00:04:25

Lesson Description:

An important task in managing SQL Server is configuring access to the instance and database. This video is the first of a two-part discussion on how logins and users are combined to provide authentication and authorization for a SQL Server instance. We discuss authentication methods as well as logins and roles. Feel free to reach out to me with any questions on the Linux Academy forums (@lfowler), community Slack (@Landon Fowler), or Twitter (lfowler_LA)!

Database-Level

00:04:05

Lesson Description:

Continuing our discussion on authentication and authorization, this video looks at the part database users play in the user login team. Feel free to reach out to me with any questions on the Linux Academy forums (@lfowler), community Slack (@Landon Fowler), or Twitter (lfowler_LA)!

Configuring Active Directory Authentication

00:12:55

Lesson Description:

One of the great features of SQL Server on Linux is the ability to directly integrate with Active Directory, allowing us to provision logins for AD users and groups. In this video, we demonstrate how to configure our server to take advantage of AD authentication. Feel free to reach out to me with any questions on the Linux Academy forums (@lfowler), community Slack (@Landon Fowler), or Twitter (lfowler_LA)!

Hands-on Labs are real live environments that put you in a real scenario to practice what you have learned without any other extra charge or account to manage.

Configuring User Access in SQL Server on Linux

00:30:00

Troubleshooting

Troubleshooting Strategies and Tools

00:09:03

Lesson Description:

A daily task for DBAs is troubleshooting system issues. In this video, we discuss what resources we have available for investigating issues with SQL Server on Linux. Feel free to reach out to me with any questions on the Linux Academy forums (@lfowler), community Slack (@Landon Fowler), or Twitter (lfowler_LA)!

Managing with PowerShell

Using SQL PowerShell

00:08:55

Lesson Description:

With PowerShell Core, we now have the ability to perform administrative tasks in SQL Server using PowerShell. This video covers how to obtain and use the SQL Server module for PowerShell as well as a number of other tricks for harnassing the full potential of PowerShell for SQL Server on Linux. Feel free to reach out to me with any questions on the Linux Academy forums (@lfowler), community Slack (@Landon Fowler), or Twitter (lfowler_LA)!

High Availability and Disaster Recovery

Always On Availability Groups

Introduction to Always On Availability Groups

00:10:38

Lesson Description:

Always On availability groups (AG) are a feature exclusive to SQL Server and an incredible way to achieve high availability for our databases. In this video, we discuss what an AG is, how it differs from traditional failover clusters, and the considerations for using it on Linux. Feel free to reach out to me with any questions on the Linux Academy forums (@lfowler), community Slack (@Landon Fowler), or Twitter (lfowler_LA)!

Configuring Always On Availability Groups

00:07:15

Lesson Description:

Now that we have the core concepts of Always On Availability Groups, this video discusses the various deployment options and how to configure our SQL Server on Linux environment for them. Feel free to reach out to me with any questions on the Linux Academy forums (@lfowler), community Slack (@Landon Fowler), or Twitter (lfowler_LA)!

Backup and Recovery

Planning and Performing Backups

00:11:40

Lesson Description:

Having a proper backup and recovery strategy is critical to ensuring our business can continue in the event of data loss or corruption. This video demonstrates how backups work in SQL Server on Linux and how to develop a strategy for meeting our company's recovery needs. Feel free to reach out to me with any questions on the Linux Academy forums (@lfowler), community Slack (@Landon Fowler), or Twitter (lfowler_LA)!

Restoring Databases

00:05:42

Lesson Description:

Following our discussion on backing up databases, this video covers how to restore them. This includes a look at the syntax for full, differential, and log restorations as well as the implications for how we restore them. Feel free to reach out to me with any questions on the Linux Academy forums (@lfowler), community Slack (@Landon Fowler), or Twitter (lfowler_LA)!

Hands-on Labs are real live environments that put you in a real scenario to practice what you have learned without any other extra charge or account to manage.

Backing Up and Recovering a SQL Server on Linux in Azure

00:30:00

Conclusion

Final Steps

What's Next

00:03:07

Lesson Description:

Congratulations on finishing the course! In this video, we do a quick recap of what we've learned and discuss where to go from here. Feel free to reach out with any questions on the Linux Academy forums (@lfowler), community Slack (@Landon Fowler), or Twitter (lfowler_LA)!

Take this course and learn a new skill today.

Transform your learning with our all access plan.

Start 7-Day Free Trial