Step by step - Run and Connect to SQL Server in Docker
Вставка
- Опубліковано 1 жов 2024
- In this video we show you how to spin up an instance of SQL Server in Docker, then connect into it using both SQL Server Management Studio and an “attached shell” running the SQL Server Command Line Tools.
A companion article can be found at: dotnetplaybook...
My Book: www.apress.com...
Cheers everyone. I followed the exact same steps and when i attempted to connect to my sql server instance via ssms, i was receiving an error message. Is it possible that my issue lies in the fact that i run docker with windows containers and not use a subsystem for linux?
Hi Les, How do you deal with db backups, or do you just backup the container ? What if you rebuild/redeploy the container, how do you manage not to loose any data present in the db ?
Great content btw. Rgds
Here, enjoy.
docs.microsoft.com/en-us/sql/linux/sql-server-linux-docker-container-configure?view=sql-server-ver15&pivots=cs1-bash#persist
Hello Les,
I tried it but i have the following error
encountered an error during hcsshim::System::CreateProcess: failure in a Windows system call: The system cannot find the file specified. (0x2)
Did you know what's happened ?
I am kind of new to your channel and really like your videos so far (working through the 11 hours). But two questions/comments here - 1. Where did the data file go? Is it in your container or on your local file system. 2. I am really unsure of the real world use case for this. Seems too cumbersome for a dev environment (compared to just installing SQL Express locally) and the idea of running production SQL Server docker container just seems highly questionable.
BIG QUESTION : i am on windows 11 and i have installed SQL server in docker how can i map SQL server data / log directory to host machine ? any one have link for help ????
Mate thanks again for these videos, I'm learning a lot, I'm gonna watch now the Docker Compose video, I'm gonna try this but with a postgres DB and see how it goes, would you make a video about db volumes?. Well thanks again you're really good at teaching!
Hi Alex. I think I may start to use PostgreSQL for some of my videos going forward, will certainly be more cross-platform friendly! No plans on doing anything on DB volumes at the moment but have added to the backlog of ideas - so thanks! Les
Hello Mr Les Jackson, I find your tutorials very interesting. I have installed sql server on docker on raspberry pi5, but I can't manage to connect to the database on azure data studio or sql server management. I have installed postgres and I connect easily. Can you help me? thank you
finally i found a tutorial that wasn't indian english
How to access the docker sql server db from client computer
Thanks Les for the video. However, when I am running the below command to spin the SQL server container
docker run -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=Pa##word' -e 'MSSQL_PID=Express' -p 1433:9191
-t -d mcr.microsoft.com/mssql/server:2017-latest-ubuntu
or
docker run -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=Pa##word' -e 'MSSQL_PID=Express' -p 1433:9191
-d mcr.microsoft.com/mssql/server:2017-latest-ubuntu
The container immediately exits.
docker ps -> returning no container running. So can't connect to this instance from SSMS.
Could you please suggest? Thanks!
thank you Les for everythink. I have a question. ı cant connection to SQL server like you. ı write =>localhost, 1433 =>SA =>Password. but didn't work. Do I need to register somewhere previously?
unclear to me how PROD would up-scale SQL instances (e.g. spin-up extra containers) to meet load increase when the data is stored within an individual image. Presumably would need some external volume, but I'm still lost how many SQL instances would "share" data except by some replication arrangement. Think I will have to view all your Docker and MicroServices courses to get that wider picture.
In command what does two ports means i.e 1433:2000 1433 is used to connect to it then what will be 2000 port used for?
hey ,, Mac users not have sims ,, how to connect ?
Could you make a video about connecting to SQL Server on host from docker?
Very nice tutorial . On Linux or Mac you also have the option of using Azure Data studio (From Microsoft), an alternative to MSSQL server management studio.
Azure Data Studio pretty straightforward and helpful
Did it has all the feature od msms
Really useful ❤️🔥
How can I use same gui version of Sql server on MAC
Just say thank you for your video. Help me too much.
thank you sir
on linux you can install azure data studio or dbeaver to connect to sql server
Hi Les, thanks for the video. If you have Docker running on a Mac and ahem restored a .BAK file to it- can you then connect Filemaker to that instance somehow?
Hi Les! Finally someone to present Docker clearly. Of course, I became a follower of your channel. However, it seems to me that your system is Windows, but you are running an image of SQL for Linux. My system is Windows and I configured the Docker for Linux container. I did the same procedure as shown in the video. The image was left with the "running" icon, but moments later it stops, but does not show any error message.
How can I connect a MSSQL DB (external) from my docker container ?
What's the difference between docker compose and docker swarm
Hey Les,
I am a great fan of your videos. I have started learning Docker and your videos are helping me in a very great way.
I have one requirement, I have created Chabot using Microsoft Bot Framework. I deployed that chatbot to azure, but its returning dummy data. Here I have to use my SQL Server database within my company. When I give the SQL connection details in Chatbot and run it in Emulator it works fine but when I deployed the same in Azure, it gives me an error. Azure is not able to connect my In-premises database.
Do you have any way to do this?
I will be very grateful if you help.
Thanks for tutorial, so useful.
Cool glad you got benefit Tiago! Take care, Les
Thank you so much, i am new to docker, its really help me.
very well done. thank you.
Excellent tutorial
Hi Les, would you run sql server in a docker container for production environment. Or is it for developer environment only?
Awesome video and lolz at a programmer not knowing name of greater than >
Thank you Les for Awesome work. Really appreciate your efforts helping us.
Thank you for making this
Thanks for the video.
You are amazing! Thank you for what you do. I learned a lot of stuff from you!👍
Thanks Nice and clean mate.
Thank u, this video very useful for me
How to connect with loch host machine ms sql server via docker container?
hello sir you a very good teacher
Wow! Awesome video! I pretty much had my docker container running on my Cenrtos7 VM but wasn't sure how to use MSMM to connect. Thank you, you totally covered everything I need. Definitely subscribing~! ^_^
Thanks for the Sub Mark! 👍 Hope You're safe and well, Cheers from Melbourne, Les
Thank you very much!
Docker is really nice. Thanks for sharing =] Could do make a video teaching how to deploy an application with docker? If I'm using docker the client will have to install docker to use my app?
Hi Fernando - check out the Deploy a .NET Core API to with Docker video on app deployment. If you've created an image of your app for use in Docker then yes you'll need Docker to run it. However if it's a web-based app, then only the server component will need to be hosted in Docker so not necessary for a client to use Docker - just a web browser as normal. Hope that helps?
Thank you so much! Best content
Les, thank you for this video.
I gave thumbs up as soon as I heard that awesome accent
Nice example. Waiting for your next video regarding Docker Compose.
Hi Raghav. Docker Compose video is half done! I was trying to finish it this weekend but as you can maybe tell from this video I was starting to loose my voice! Hope to have it done shortly. Cheers, Les
Nice tutorial Thanks
now a fan of your work. thank you.
Thanks mate!
Tks you
Thanks 👍🤩
Super!
Fantastic.