Connecting a GUI to our SQL Server
Published: Apr 24, 2024
In the previous blog post we walked through getting our SQL Server 2019 Docker Image and booting up our Container.

This gave us the Linux version of SQL Server 2019 on our Windows Desktop.

However, no-one likes using SQLCMD for everything, so we’ll want to connect a GUI.

I’m currently using Azure Data Studio for a lot of my work (mostly because of the Jupyter Notebooks – I’ll write something about those on my SQL Server blog) and as that’s designed as a platform independent SQL Server studio I’ll be using that with my Container.

If you followed my previous blog to a tee then you’ll know that we have a SQL Server set up with a map from my desktop’s port 14330 to the Container’s 1433, which is SQL Server’s port.

We COULD use localhost for connecting, but I like to use IP address so we need to find the IP of our desktop. Mine is currently 192.168.1.69 as found by running IPCONFIG in a dos window:


So now all we need to do is boot up Azure Data Studio and make a connection to the SQL Server using our IP, the port number, and the SA account with the password we used when creating the Container:


And you can see that we have now connected to our machine and that it lists the OS as Linux:


You can now happily run queries against it as you would any other SQL Server:


The only noticeable issue is that because we are in a container, we have no access to the Windows OS disks, only those “disks” inside the container itself:


We will therefore discuss how to add databases to this in another blog post because it’s not the nicest thing to do.

Lastly, one thing I did want to note is that a Container has all the resources it needs inside a Container, but it does call out to the OS in order to use its CPUs and RAM. Therefore if you look above you’ll see that it has automatically created 8 tempDB files to mimic my 8 cores in the desktop. It also comes with the default configuration, so you need to remember to do things such as limit your memory usage etc.

Hence, it’s just like having a SQL Server except for the disks (and the fact it’s Linux).

Leave a Comment
Your email address will not be published. All fields are mandatory.
NB: Comments will only appear once they have been moderated.

Kutech  CEO
Kevin  Urquhart

CEO

I am a SQL Server DBA, Architect, Developer, Trainer, and the owner and CEO of Kutech. This blog has been going for nearly 10 years now over several guises and this is its new home. I hope you find it useful whatever your endeavour.

Categories


© Copyright 2021 Kutech Solutions Ltd.

Our site uses cookies only to personalise content and analyse traffic. We do not use cookies for advertising. Policy