Using WSL2 for the Database Development Platform by Carlos Lopez || SQL Server Virtual Conference
Oct 30, 2023
As technology evolves Windows Subsystem for Linux has too, after many years now we can see that there is a fully integrated cross-platform inside the Windows machine host. Now we are seeing that Docker is now working for the Windows Subsystem for Linux (WSL).
In this session, we will take advantage of this new out-brake to maximize the use of resources and apply this scenario into the SQL Server world with the use of containers. We will manage a containerized SQL Server database and inspect through scripting capabilities between Linux and windows environments working together.
About Speaker
Microsoft Data Platform MVP Senior Database Administrator MCP
Guatemala SQL User Group community leader,
Experienced in multi platform databases on RDBMS MS SQL Server, Azure SQL DB, Oracle, MySQL, No SQL experienced in MongoDB as well.
Experienced in large-scale relational databases management support, passionate on K8S and Docker container tech oriented to development and data platform.
Advanced Linux user, Gentoo distro fan since v.1.4.
Conference Website: https://www.2020twenty.net/sql-server-virtual-conference
C# Corner - Community of Software and Data Developers
https://www.c-sharpcorner.com
#SQL #WSL2 #database #conference #sqlserver
Show More Show Less View Video Transcript
0:00
Hello, everyone
0:04
My name is Carlos Lopez, as already introduced me. I'm going to talk about getting started with WSL 2 for the development platform
0:19
So here's a little bit of my credentials, but the intro was great, so I'll skip that
0:24
And the agenda for today is we'll see what is WSL2, what is, what features does it have
0:32
the performance facts and history for the product and benchmark, a little data of it
0:38
how to prepare your environment to it, configure your WSL2, the requirement scenarios for using containers
0:48
preparing your SQL environment using your IDE tools and all the platform, the newest tools that there is on the market
0:58
prepared for Microsoft to use it, and a demo of hovering, checking the environment, the containers
1:05
preparing the DB, the OS, and all the ingredients that you can interface with it
1:14
So that's about what we're going to cover. These are the insights of what it is and the features
1:24
So WSL2 is a Windows subsystem for Linux. Currently, we are on the version 2, so it's not that new, but it is enhanced
1:34
It's better. What it allows us is a complete new subsystem over Windows, on our Windows
1:41
running any distro that is on the Microsoft Store. You can execute bash
1:50
You can run any script transparently. That's great. And you can run any turbo package as an RPM
2:01
You can run it as whatever way you install on Linux as a bare metal
2:08
you can do it as a virtual machine on this WSL. So another addition is that you can execute Linux binaries from Windows
2:22
and the performance of the usage of the file system in your Windows
2:30
is improved on the WSL too, because you can see it transparently on the Linux
2:36
from the Linux to the Windows, and you can use it transparently
2:41
And that's part of it, the next feature. That is the full compatibility with the kernel, Windows kernel, that is, from the Linux
2:50
And that allows you to run any API if you are trying to use any driver that you need
3:02
You don't need to use, I don't know if you are familiar with Linux
3:06
but in the past, you have the driver, you need to use a utility
3:14
like any disk wrapper utils or wine maybe, to use a full compatibility from the libraries that there were on Windows for drivers itself
3:24
In this, you don't need that kind of emulation. You can use the API that you have on Windows, so that's great
3:33
So here's a little benchmark between the two versions. And here are some capabilities that you can do on the VMware and the VirtualBox
3:44
From the WSL1, you could use VirtualBox and VMware. In the WSL2, you can't
3:54
And there's a reason for it. You can now use the virtualization tool that Windows has
4:04
because in that way, Microsoft could enhance and improve the file system usage
4:12
for the virtualization for all the Linux that you're running transparently on your computer
4:21
on your Windows host. So that's the improvement. That's the way that the kernel and the OS file systems are improved in the boot times
4:31
and all the ingredients are better then. So for that reason, I would like to show you some benchmark that the open benchmarking org.org had done over the WSL2 product
4:47
And overall tests shown that WSL2 had improved from 63% against 51% that WSL1 had and against the bare metal Ubuntu 20
5:02
well, you know, there's a difference because the other, the bare metal
5:06
is a complete installation from your machine and against what you have on the OSL
5:15
that it is a virtualization after all. You need to like have a sublayer there
5:19
and of course there will be some differences, of course. But in terms of performance itself
5:29
when it did test it on SQL RDVMS engine. They tested on SQLite
5:40
They haven't tested still with SQL Server. But WSL2 had improved in fewer response time
5:53
like three times, if you see it here, three times better than the first version
5:58
and had improved even compared with the bare metal version. So that's great
6:04
And they have tested with NoSQL databases with Redis. And you see WSL has improved how many requests per second can attend
6:17
even gained a little bit against bare metal Ubuntu. That's great. and for that I just wanted to show you how it had evolved
6:30
And this slide is just to show you the evolution of Docker
6:34
and why am I talking about Docker? Because we're using it as the container tool or infrastructure
6:43
that we're going to put on our Windows to use. And then we can see the evolution from the first version
6:52
that uses, everything uses hypervisor. But the great thing about WSL
7:02
that this subsystem doesn't use microkernels as a little version of, or a small version, sorry
7:11
of Docker had prepared for the product in the first version, as we see here
7:18
that only had Docker machine and Docker compose, from the evolution here from 2016 to 2019 they use a VirtualBox and Mobile Linux and a boot to Docker version that a microkernel design for Docker But it not the complete thing the complete Linux that you can use on Docker
7:42
So what is the improvement here, really? It's that you can have the complete Linux on your Windows hosting for your Docker
7:53
In that way, you can do whatever you like or whatever you need for the product and have the SQL Server in it
8:00
And that's great because you can't use it and you can prepare it for your environment
8:07
As you know, a container for SQL Server is no more than a SQL on Linux
8:13
So you have the complete Linux there, right? So that's great. Okay, so here are the layers that you had on the common with Docker on Windows
8:24
You have the Docker CLI through the PowerShell and going to the Docker core to the backend
8:30
That's how we're used to managed. But here now on the backend is transparently because you don't longer need to interface through to PowerShell
8:45
because you can do it directly with the, you can use it, PowerShell, if you want
8:52
but you can use the Linux instead and have directly connected to your container
8:59
instead of going to PowerShell, connecting to the container, using the Linux there
9:05
and getting to your container. So it fastest the process there. So we're going to prepare our environment and configure
9:17
and see the configuration on what you need under requirements to prepare our SQL
9:23
Because right now we have only talked about the operative system. Well, just a little bit more here
9:30
for me with a little bit. The requirement for the WSL right now
9:37
is the Windows 10 version 20. but now it's on Windows Home
9:45
So that any device can have it. You only need to enable it using the
9:53
deployment image servicing and management tool in your PowerShell and enabling the feature and restarting it
10:01
I have put it as a number two step to install the Docker desktop, however, if you only want
10:09
to use it for another purpose, you don't need the Docker, however
10:13
but in this case we need the containers, so we need it
10:17
In the third step, we're configuring the WSL with these commands. The parameter L is for listing all your Linux there
10:36
You can have more than one, You can have more than one image there
10:40
And the second parameter is verbose. So you can check out what it's doing
10:47
And the second part of the upgrade is that now that you have the first version
10:52
once you install, you will have WSL 1. And then you have to parametrize the set version to 2
10:59
So you'll set it to version 2. And this is how it will look
11:04
you will see here you have all the images that you have on your machine
11:13
And when you use WSL on your PowerShell, you automatically can connect and see all the features
11:20
and all the stuff that you're running, the processes and all the resources that you're using on the machine
11:28
And that's great. And even tells you a little bit of information, so that's great
11:33
Okay. So the next part is using containers against not using containers
11:39
And what are the pros and cons for us? And what benefits do we get on it
11:45
First of all, use a container scenario helps us. Because it helps us to be on the edge on what is using all the infrastructure right now
12:01
and everything is using containers. So that's a lightweight, faster, efficient way to do it
12:10
And the cons are, like, we need specialized knowledge to use it
12:16
because it's not, like, installing and only using the default way to use it
12:20
But at the end, it's an investment, if you see it. The next step is using microservices technology
12:29
Again, it complex the layers, between the layers. However, the microservices are technology to prepare, lift, and shift very fast
12:44
and help you to develop, destroy, and construct infrastructure very fast. So it's a good thing
12:53
And the third part is you can introduce yourself to DevOps culture to involve SQL Server to using it in your machine and preparing your code as a stage machine that you can prepare to use it to the cloud, Azure, right
13:13
So in this case, that helps you. The accounts, well, try to put there a little bit
13:22
A standalone isolated stage, couple versus decoupled, that depends on your scenario
13:29
I mean your architecture, your business culture and your business infrastructure. Not all is for containers, however
13:40
it depends, right? But if you can, it'll be great. And the last part, as a pro, I put it
13:50
is using infrastructure as a code search. I mean, in search of, you're trying to put your code
13:58
as trying to create your code to be agile for using infrastructure in your Azure cloud
14:08
So that'll help you to move all to that technology. Okay, so I had identified a problem
14:21
If you say to me, how about using WSL, but not as a, I don't want to use container
14:30
I want, if you say Linux is a whole system, then I want to install SQL Server for Linux in my Linux Virtualize, in my Windows, on my WSL
14:46
You, theoretically, you could. However, WSL has a little bit issue there
14:54
because it doesn have system D which is the process necessary for SQL Server So when you you can put the binaries there and try to install but when you do
15:07
it will say you that systemd is necessary to operate. So it will fail
15:14
So you could do some add equations to run systemd, some scripting that in the community
15:22
they're trying to do and put in the run level to run it
15:27
However, doing this is more like forcing the product to do it
15:34
And right now, it is not prepared for a simple installation. So you need to study a lot and prepare a lot
15:43
So that's not for it. The best way to use it is with containers and Docker
15:49
because it is prepared for it. And so it's lightweight. So how can I use it then
15:56
Well, you can install your Ubuntu. You can set your Docker on your Ubuntu
16:01
and you can install your SQL Server from Docker using it. And here it is when you have Docker
16:09
Here is the profile in your settings. We'll see it a little bit further
16:15
You have to use WSL in your Docker, and you have to set it here in general settings
16:22
and you have to enable any resources the available distribution that you have on your Linux
16:28
So you have an Ubuntu, you will add it on, sorry. And then you will, Docker will interface with WSL
16:38
You don't have to do anything else. And then the interface is done in that way
16:43
So that'll be it from the steps. and you will can have now your SQL
16:50
Now we'll talk about how to, what are the best practices to use your code
16:57
and how to manage when you have your scenario. So first you have to define a SQL container
17:04
for your Docker file. We'll talk about more of a Docker file
17:10
What is, it's a config file to create a Docker image with your customized information for your docket definition
17:20
So that's a best practice. The second one is create volumes dedicated
17:24
for SQL container data. And that's one special note here because you can create a SQL container on the fly
17:38
if you like, without parameters and without volumes. but the problem here is that your information is volatile
17:50
and how about I want to use it more than one more than one time
17:57
so that'll have an issue there. So with the using of volumes, you can prepare a dedicated storage
18:05
where you can only mount your data in that reusable scenario. The other is build and test your Docker container SQL image
18:18
You have to like test it. You have to verify that it works. And that's for the next part
18:24
You can use JIT for it. You can have the repository there and configure it
18:29
and integrate it with your code. And you can have it on GitHub, of course
18:37
and run it, your image as container. And then for last, if you have all the scenario here
18:52
from here to here, you are on your computer. And the next step, you will prepare your code
18:57
and launch it to Azure container instance. With this, you use all the feature of the cloud
19:05
to move all your code that you have prepared to pull all your container into a repository in Azure
19:12
In that way, you can prepare it for your next step. You have committed in your local machine
19:18
you have tested it, you have verified, and now you can move it and pull it to Azure
19:22
And that's one of the greatest thing that you can do. And right here, you have all the good practices
19:30
that helps you to do it. And what about tools? What tooling are we going to use to see it all that is coming
19:39
First, well, everything, we'll use Visual Studio Code with the WSL2 extension to configure our configuration
19:48
to define it to our Ubuntu. The next, we'll use a SQL Server Visual Studio Code extension
19:55
to connect to the SQL Server on our container locally. And next, we'll use Azure CLI tools
20:03
to connect to the Azure that we can see the registry there
20:08
And then also we'll use Docker VS Code extension to verify the containers
20:16
even so we can see the Azure registries there and we can manipulate it visually
20:25
And we can use Azure Data Studio and we, of course, the beloved SSMS, if you like
20:33
just to see the impact or the transparency of using it. So that's what we have, and let's go to the demo
20:45
One second, please, I'm just checking where I have it, okay. So let's start
20:54
Here I have, let's see, let's start again, sorry. Oh, just one note, yesterday was the VS Code day
21:02
So it was great. You can see it on the transcript and on the Microsoft Learn videos, you can see it there
21:11
It's really cool how to use it. And there are a lot of examples that you can use there
21:16
So let's go to business. First, we can see Docker configurations here
21:24
Let's see the parameterize. Let's see how much time do we need here, settings
21:32
Okay, so a little bit slow. Well, just wanted to show you that in Windows Features
21:42
if you are asking, we were talking about hypervisors, right? So we talk about that Hyper-V was the one that managing the Windows subsystem layer
21:55
but in this case I don't even need to have configured Hyper-V on my machine
22:03
because I can do it if I want to but that'll be like putting a little bit of stress to the machine
22:11
but you don't need it. However, it is used. So I just wanted to show you the images in the containers
22:20
how it looked in a GUI way. You can do it in this way if you like And here the setting that we were talking about First in general we have to set the use of WSL2 engine
22:38
and in the third step, we have to use the resources and WSL integration
22:45
and we have to enable the Ubuntu. Why Ubuntu instead of other
22:51
I have Kali and I have Alpine. Because you have to use a distro that is supported by SQL Server, and the supported ones are SUSE and Ubuntu
23:02
So I use Ubuntu. So that's the main reason. That's why. But you can do it, whatever
23:09
You can also enable each one, but that will be for other projects
23:14
So, the second part is using, well, I'll use PowerShell, but through the Windows console
23:25
So, I think I don't have any open session. No, I don't have it
23:36
Windows Terminal, I'll open it. And then, here we are. We are saying that the cool part of it is that you can choose whatever language you like and whatever distribution you like
23:50
Even you can use the Azure CLI to connect to your Azure and do whatever code you like
23:57
And it's transparent also in Azure if you like to throw code to Linux or PowerShell
24:06
That's not different there. So the next step is that you have to prepare your environment
24:12
I'll use Visual Studio Code here with a parameter, remote, and stating or specifying WSL plus
24:19
and the distribution that you're using. But to do it, I need to verify what WSL do I have
24:27
So I can list it here. And these are, so this text, I can put it here and it will open
24:37
I have it already open. it will charge you the libraries and will set your environment with the WSL Ubuntu as you like
24:45
to use. And why do I do that? And why do I care to do that? Because if I only open code as it is
24:55
I cannot interface completely with the WSL. I here have environment to my Linux machine
25:02
using the windows so in this way i am like moving to the other way and i can uh even when me when
25:11
you open the file system and you open the file you'll see that you have the the the location of
25:18
your linux not your windows if you put show local it will put you in your windows so that's what
25:27
changes a little bit. And there are little tweaks there, but for our demonstration, it doesn't matter right now
25:33
So we talk about these three commands right now. WSL, hyphen L, hyphen B, hyphen S
25:41
to set it as default and to open the code. So let's talk about using for SQL Server itself
25:51
So you can download from your Docker and put it from the Microsoft repository
26:00
You're using Docker pool and you will take your images from the whatever distribution you're using
26:09
So with that, you will see, let's see, let's clear here. Because it's a little bit messy
26:18
Okay, so let's see, where were we here? So in the same way that we did on the GUI, on the Docker
26:32
we can see the Docker pool that we have done. Here are the SQL server distributions that I have
26:39
I have a 2019 and a 2019. Also, I have another that I have created myself
26:49
as a Docker, using a Docker file, creating a Docker image for it
26:54
And we'll see it a little bit more further. Just going to continue with the code
26:59
Bear with me, please. Okay, so here are a rudimentary way to do a container
27:05
for a SQL Server, where you can use Docker Run. You'll always use a Docker Run
27:12
however, the parameters are the differences. You have to stay the port from the host to the guest
27:21
That's a network configuration that you can choose. Here's the name of the container that you are choosing to do
27:31
We'll use this one for our demo. And with that parameter, we privileged the run of the container in the running with privileges
27:44
And this is the TTY interface with commands to the container. and explicit the parameters for the SA password
27:55
that you have to configure and accept EULA for your container. This is like you're installing or something as such
28:05
And then you have to select a volume as we were talking
28:09
In this particular example, I'm trying to use a way to use Windows Path
28:20
as host followed by a column character to the guest position in Linux. This is the
28:30
container one and this is the local windows path. If we were using a PowerShell
28:36
we have to use inverse folder character so that's just a note in case you are
28:45
We're using PowerShell instead to create the Docker. In this one, we are using Linux
28:50
so we are using the division character. So in this one, you have to select the Docker image
29:01
You have to use only four digits. You only need to use, sorry
29:06
four digits of the image name, here are. So in this case, we are selecting the 2017 version of it
29:12
and that's it. That's how you create your container. That's like the rudimentary way of doing it
29:21
And here are a little bit more complex situation. Oh, before I skip this part
29:27
I have created a Docker volume for this one, for this container
29:34
We can see the list of your volumes here. I have a shared volume for the 2017
29:40
and a shared volume for 2019 and a SQL volume. Okay, I have created these folders, if you like
29:47
where the data will be, and I can prepare, I think that you can even configure a loan for it
29:55
if you have configured a dedicated loan for it, and you can select
29:59
a path and a drive for it. So that'll be great. So, and that way you cannot lose anything
30:10
You know, if you like and have the data, like for various purposes
30:17
So you have to be prepared for any scenario. So here are another configuration of the container
30:24
run it by the 2017 version. Here are, I named it with the number two version
30:32
I didn't scratch this. This had the option of volume instead of mount
30:38
I can use volume instead of mount and set it. However, I'm using mount in the real version
30:45
where containers are to use the option type of bind to binding the folder to the SharePath location
30:55
to the target, the shared volume that I have created here and the Docker volume
31:01
I will target to the Mount SQL in the container. The same parameters are as I have shown you before
31:10
And here are the shared volume for the 2019 with a different image
31:17
If you see here, I have a different image, right? So that's, I'm using the image for 2019 instead of 2017
31:24
And that's about it. So let's try to, and just this one is the same
31:33
It's another example with a rudimentary way to using a source bind and a destination
31:40
Okay, so let's try to run the container that I have created and then run the scenario that I have
31:49
which is that database refresh. and then we will try to delete the container
31:56
and do it again. So if we have enough time. Okay, so what we are doing here is using Docker PS
32:06
to see all the processes that are running. We see here that I have one container
32:13
which is the name that we will see here. And I have it running up
32:19
The only command that I need and docker start. We'll stop it as here and the response will be the name of the container
32:36
This is the response here and it shows stop. But it is a little rudimentary to see it in code
32:43
just because I'm used to it. But if you're not, you can use your extension. You can use docker
32:50
extension. You can see it here. It already refreshed and you can start it from here
32:57
Start. It's the same that doing the command. So it has started. Docker PS can show you that it will
33:06
be up in like half of been up like four seconds. Start in eight seconds. And if you do a Docker
33:14
and inspect, you can see the JSON configuration for it, and you can see how it is configured
33:21
the bridge and all the information for the ports. And you can see this particular position
33:30
You can see the version of the SQL server that I'm using, the distribution of the Ubuntu LTS that I'm using
33:38
And you can see, let's see here, hold on. the mount here is the option that I want to show you the type bind to the source that I'm using
33:55
that's in WSL as your host and the destination in your container and that's it so now that you are
34:04
on your container that you can see your container we're trying we'll see a little bit of a scenario
34:12
So right now we'll see the mount points where the location of the WCR are
34:18
We're seeing, we'll see, hold on a second, the folders where I have the back files here
34:30
You see mount C drive of the local machine of Windows where I have the backups
34:38
I have the Windows local machine for the queries. here they are, the queries that I'm using
34:46
And this one that I showing is the location of the WSL Docker desktop bind mounts of Ubuntu where it shows the position where the container has all the queries
35:01
So in any particular point, if you edit your file in your Windows
35:08
and you want to update your code, let's say you are trying to download it from somewhere
35:16
SQL server and you have their script there and you have to put it in your containers. You can do it
35:23
from your Linux, but instead if you're using your Edge or whatever source you have and you
35:31
wanted to put it in your container, you only have to copy it. You have to move it from your Windows
35:38
that your Linux can see and put it in your destination that the container can use
35:44
So in this scenario, what we'll do is using a bash script to do the transportation of the files
35:52
And the second scenario, and see the tell log operations for the transportation
35:57
It will see the scripts. Don't worry about it. And then we'll see the connection for the SQL server that we're connected
36:06
See the version using the SQL command inside your container. and then we'll refresh the database
36:16
How? Using the database restore. So what we'll do right now is to show you the bash scripts of transport
36:24
and refresh and see the operation files. And see, because I did the tail operation
36:30
Okay, so transport. The transport bash, what it does is manually make changes in your Windows script
36:38
copied from your, if you did any changes from your script, copied from your Windows environment
36:49
take it from there and put it in your container bind that you have designated for it
36:56
Put a log into it and then copy the scripts in there
37:01
Mount it in the mount point position, such as the same that we did on the first step
37:07
Then once we have copied, this is a small operation. I have granted permission as 777
37:16
You can do whatever you like. This is just a scenario to show you
37:21
that you can do whatever you like there and compress the backup file
37:25
if I need to do like an automate operation there. And put a little bit of a tar
37:31
and put the naming of the file and creating a log. So I'll create a log there
37:37
and put it. And that's about the transport bash script. And the other is the refresh
37:45
What it does is to execute three queries. First, it does the restore using SQL command
37:54
connecting and executing the SQL restore. The second operation is to do an inspect
38:02
do a read error log. Okay, so what it does here, we'll see the script one by one. Let's see one
38:14
here. Let's see, edit here the files. One is the restore. That's the most important part. Okay, so
38:22
in this part, this is like your known and beloved T-SQL. The first part is to
38:30
do the verify only logical verification of the black files that we're doing
38:39
to verify that all the files are well and there. There are three or four, sorry, four
38:47
And then it do a performance of the restore of it and put it in the location where we're specifying
38:56
The default location is varptmssql. And then finally do integrity check using dbcccheck file, db
39:05
So in that way, this is like a small scenario to do a refresh scenario to doing in a container
39:12
So you can execute it very fast and do a very automated way to do it
39:18
This is a way to do it. The other way is that you already have the
39:22
the, how do you say it? The MDF and the LDF and you just attach the database
39:28
This is another scenario. There's another way to use it. But in this case, we're trying to like simulate a process
39:35
that you can repeat every time. So, okay, we'll return to the agenda
39:42
and run the transportation of the files I know that we have our version but in this case we simulating that we transporting and showing
39:54
a different version of it. So, if we do this, we'll see
39:59
that the files have been updated. It has done a little bit of copy there
40:08
copy there, have compressed, and given the permission, run the step three, and everything have been done well
40:16
and done the operation as we expected. So now, we'll connect through the container
40:23
and see the version. This is just a way of doing things
40:31
just to show you that you can connect to the SQL Server using the command shell
40:36
the command shell you can it will see it in another way trying using the tools so
40:42
don't worry there will show you a lot of ways that you can connect and then
40:48
then we'll do the refresh in the bash performing refresh operation because we
40:56
have the back files so have seen that the back are verified the transportation
41:04
have been successfully. And now it is restoring the first database. Cool thing. I have taken this
41:13
from a 2012 version backup from Windows and has updated to the 2017, I think it is, version. And
41:23
it's a Linux version. So you see it is transparent to the engine to do the performance of the restore
41:29
Okay, it is almost finishing. And it is the dbcc check, and I put the logs there
41:41
so it showed me everything there. It is just a way to do it
41:47
You can also put it in a log file if you like, so that way you can read it later and have all your version there
41:56
or you can have it on your JIT or other ways to do it
42:03
Okay, so now we have refreshed the database. Now let's connect it to the database and see what it's doing
42:12
what we have there. So let's use Query Inspect. And let's connect
42:19
I'll connect here and connect. After that, I'll connect using SSMS and then Azure Data Studio to see it in different ways
42:30
So you can see it here. WSL. And it takes a little while to connect, I think
42:38
Depends on your machine. And you can use this SQL feature to see the query here, if you only want to inspect and see the query as it is
42:49
You can see this is the log that we're checking. Log operation is there
42:58
You see the DVC check that we did, is there. The restore operations that we did is there. Everything. Okay
43:08
The second part is to show you the log files location of the master and all the metadata
43:14
for the physical link. Although it says that it's on var opt, it is only logical location for the container
43:25
The physical location for the container is the mount point that we have created, that
43:30
is the docker volume that we have created, sorry, for it, so it is pointing there
43:37
The other is when you... This is the version parameter and you can see here..
43:51
How the 2017, I think. And the databases that we have here, the times that we have restored
44:01
This is the query that we have run. They run it right now, tc.co.tune
44:08
These are the databases that have restored. The times that I have done
44:14
And the location for it. Where is the physical device where I took it
44:21
and the person or the username that did the query. Okay, so that's it
44:30
That's a way to see it. Now we see it in another way using the SMS the same query connecting Let disconnect and connect again
44:46
Just need the local host, need the SA, and need the password that you created for your Docker run command
44:56
And that's about it. It runs on your local host and shows you the database itself
45:01
Here is the databases that we have refreshed. Here is the query that we have run, same command. You see here, here's the log
45:16
here is the dbc gtx that we have done, the restores databases, and all that we have done
45:23
So with this, we can do whatever we like with having a Windows form to see things
45:36
against your database. So, let me see why it failed. I think that I even took, oh, okay
45:47
The head was here, sorry. The same way we were seeing the data from a different point of view
46:00
We're seeing the location of the physical files, the logical names, the physical names
46:06
and all the things, the cool things that we have for SQL Server to see
46:12
Okay, now that we know that the database is refreshed, let's try to hit it with some testing
46:22
We'll use a parameterized tool, which is a SQL stress query tool done by Adam mechanic
46:31
Hi, Carlos. I'm really sorry to interrupt. Is there a way you can wrap in just a couple of minutes? Yeah
46:37
Sorry, sorry about that. Sorry, I just- You can take a couple of minutes, it's okay
46:41
No, no, no, no worries. If you're like, I just wanted to show you
46:45
but okay, that's okay. I just wanted to let you know that you can do whatever you can do with the local host
46:55
Let's see if it connects really fast. Integrate it. If it's already too late for the next speaker, please stop me right now, and I'll stop
47:08
You can complete this part. It's okay. Okay. Okay. Yeah. I think it took a little bit to connect
47:20
So now, let's see. For database integrator
47:31
Oh, I see. Where did it fail? Let's see. Okay
47:44
So we can test it there. and we can set the connection
47:55
Put the testing tool and then when we run the... Let's use this one over here
48:08
I'll use the SQL WhoisActive, also another tool from Atom Mechanic. Run it here and you can see the utilization of the database here and have the CPU and
48:39
locations and reads and writes for the special session that we were doing for the test
48:45
So sorry that I have done it so fast right now. I didn't have enough time to, right now
48:50
I didn't complete that part, but, well, that's everything that I have done for today
49:01
I just wanted to show you that you can, whatever you can do, you can do it in all the scenarios
49:09
for containers using container D and that's it. So important note for it is that WSL is a good option
49:16
to use containers in SQL Server. And thank you for everything
Arts & Entertainment


