>> Hi everyone, my name is Vin and I'm
a Program Manager on the SQL Server Engineering team.
In this video we're going to talk about SQL Server 2019 in
containers as well as how
you can get started with these containers.
Let's get to it. So for starters,
let's take a look at the brief history of SQL Server containers.
In 2017, we released our first SQL Server containers where we had
regularly released containers for
each CU and they were all based Ubuntu 16.04.
In 2019, we're continuing to do a lot more with containers,
and here are a few points to highlight some of those areas.
We are offering SQL Server 2019 containers best
based of Red Hat, Ubantu, and Windows.
We're also adding more feature areas
to SQL Server on Linux containers.
Some of these areas include Machine Learning,
Polybase, MSDTC, and Replication.
One of our biggest feature areas in
SQL Server 2019 is Big Data Clusters.
This feature is fully based off of containers.
Now before we get into any demos,
here's a quick recap of what a container is.
In short, a container is an application packaged with
all its dependencies and it runs on
the same kernel as other containers and processes.
In contrast to VMs,
the applications to NS dependencies
run on its own operating system and kernel.
So on the left, you can see that
SQL Server is running on top of its own set of dependencies,
binaries, and libraries, and
together that makes a container and it
runs on a host alongside other containers.
On the right, you can see SQL Server
with its dependencies running on top of
its own operating system and this is a VM and it's
typically sitting on top of a hypervisor,
then on top of a host machine.
So given that a container is an application packaged
with this dependencies like a run on any system,
here's some its characteristics.
First of all, it's isolated meaning that
each container has its own set of dependencies not
shared with other containers and is also
unaffected at the runtime of other processes.
Its also consistent.
Every time you start a new container,
its using that same image which starts in
the same state that is defined in that container image.
Third, it's portable. Because dependencies
are packaged along the application,
it makes it really easy to run this container
across multiple hosts whether it's on-premise or an Azure.
It's easy to use and is easy to start and stop.
We'll see that shortly in the demo.
Last but not least, there is no installation.
SQL Server doesn't need to be installed within the container,
it is ready to run as soon as
the container image has been downloaded on the host machine.
With that said, let's go ahead and switch over to my console here.
I'm going to show you how you can run a SQL Server 2019 container.
So here on my console,
I have a docker run command which will pull down
a SQL Server 2019 container image
from our Microsoft Container Registry and start the container.
So here you can notice that I have two environment variables.
One of them is to accept the EULA and
the other one to set the SA password.
So this is the same as
SQL Server 2017 container images when you use them then.
Then we have a port mapping which maps
the container external port to the internal port.
Third, we're going to specify the container name,
which in this case SQL one.
Last but not least, I will
specify the container image that I want to run,
and in this case,
it's going to be SQL Server 2019 latest. With that, lets run it.
So in this video,
I already had the container pre-downloaded,
and you can see that it has started up.
So if I do a docker ps,
I can see that this container is already spun up.
So what I just did was equivalent to a download and install,
what you would have done it on a later system.
So from here and on, you can use it like you would
with any other SQL Server instance.
So I'm going ahead and connect to
this instance with Azure Data Studio.
So I'm going to put local host as the Zama local machine,
and then I'm going to enter the password that I just
entered that I used in my docker run command.
So with that, I am connected,
and I want just to start a new query.
I'm going to run some queries against this instance,
and I can see that I am running SQL Server
2019 and I also query the server name,
which is the container ID of my instance.
When I'm done, I can go back to my console and spin
this instance down with a docker remove command.
With that, I have spun down and removed my container instance.
So what I've just demonstrated was fairly
easy of what I just mentioned before of
one of the characteristics of how easy it
is to start and stop a container instance.
Now, what just showed you was just a very simple scenario of how
you can get a default SQL Server container
with its default configurations.
I like to share with you on how you can
get started and learn more.
So our docs.Microsoft content page,
we do have content on how you can get
started with SQL Server container.
So this is a quickstart page where
we will provide you step-by-step
walk-through on how you can get started
with SQL Server 2019 containers.
So we also have documentation on
how you can configure your SQL Server container images.
So here, we have a page with many different topics
such as running Red Hat based container images,
persisting your data with containers,
and along with other various container topics.
Last but not least,
I would love to share with you
our container lab which we have on GitHub.
So we have a lab here that covers the basics of using
SQL Server containers as well as how you
can use SQL Server containers with
an application sprung up the same time.
So all these links are provided in
the description below, and that's it for now.
I hope you can give SQL Server 2019
containers a try and also check out
other SQL Server 2019 videos on this channel to learn more about
containers as well as discover
other new and cool features. See you next time.
[MUSIC]