How to Set Up SQL Server Database with Docker

แชร์
ฝัง
  • เผยแพร่เมื่อ 8 ม.ค. 2025

ความคิดเห็น • 117

  • @DatabaseStar
    @DatabaseStar  2 ปีที่แล้ว +36

    When you search for "sql server" on Docker Hub, you may not see the SQL Server entry as shown in this video (I don't see it either). For some reason, it's no longer showing as a "best match". But you can use this link directly: hub.docker.com/_/microsoft-mssql-server

    • @OT-tn7ci
      @OT-tn7ci ปีที่แล้ว +1

      its not working either now, any idea what's up?

  • @VipulDK
    @VipulDK 2 ปีที่แล้ว +9

    Super crisp and well explained with the demo! Thank you so much for making this easy to understand!

    • @DatabaseStar
      @DatabaseStar  2 ปีที่แล้ว

      Thanks, glad you like it!

  • @rezwanahmed288
    @rezwanahmed288 ปีที่แล้ว +2

    Thank you! The suggestions were on point, really needed this.

  • @amanguniscode988
    @amanguniscode988 ปีที่แล้ว +2

    If you are on windows and you get an error, maybe try to follow these steps
    1. Open your C: drive.
    2. Locate a directory named Windows.
    3. Inside the Windows directory, find a directory named SysWOW64.
    4. Look for a file named SQLServerManager16 (your number might be different depending on the MS SQL Server installed on your machine).
    5. Double-click the SQLServerManager16 file. It will ask you for some permissions; click "Yes."
    6. Open SQL Server Network Configuration > Protocols for MSSQLSERVER.
    7. On your right, you will see a few options. Double-click Named Pipes.
    8. In the box that appears after you double-click Named Pipes, set Enabled to "Yes."
    This should fix your problem, if it does

  • @Zeadar
    @Zeadar 5 หลายเดือนก่อน +1

    Got this working on Linux from this guide. Installed docker from package manager, though. Terminal commands are the same and Azure Data Studio works on Linux, too.

    • @DatabaseStar
      @DatabaseStar  5 หลายเดือนก่อน

      Good to hear!

  • @SantificaRolle
    @SantificaRolle 2 ปีที่แล้ว

    I don't know if it is the way he explains things or his sexy voice..... but I enjoyed watching Database Star. He is definitely the best. Highest quality videos with no fluffs.

    • @DatabaseStar
      @DatabaseStar  2 ปีที่แล้ว

      Thanks! Glad you like the videos!

  • @TransportFever2Live
    @TransportFever2Live 2 ปีที่แล้ว +2

    Thank you so much! Btw you have very soothing voice.

    • @DatabaseStar
      @DatabaseStar  2 ปีที่แล้ว

      Thanks! Glad you like the video

  • @keeponwishing3856
    @keeponwishing3856 11 หลายเดือนก่อน

    THANK YOU SO MUCH MASTER !!!!! You helped me a lot!!!

    • @DatabaseStar
      @DatabaseStar  11 หลายเดือนก่อน

      Happy to help!

  • @noblenetdk
    @noblenetdk 6 หลายเดือนก่อน

    Include volume setup snd/or and restore of a db dump

  • @shaznishiraz
    @shaznishiraz 3 ปีที่แล้ว +2

    This was super helpful.

    • @DatabaseStar
      @DatabaseStar  3 ปีที่แล้ว

      I'm glad it was helpful for you!

  • @mahinouralaa4001
    @mahinouralaa4001 ปีที่แล้ว

    The video is so great, thank you!! I just have a some question, when starting the mssql-server instance by writing the docker command, if I wanted to make the database available for many devices (since i will use it in my flutter app that will be launched later) , should I change the -p 1433:1433 to the port number of the remote server and use the IP address of that remote server in that case? and would that work?

    • @DatabaseStar
      @DatabaseStar  ปีที่แล้ว

      Thanks! Good question, and I'm not sure of the answer. I don't have experience accessing Docker from another app or other device, but there should be other videos/articles out there that can help with this.

  • @noblenetdk
    @noblenetdk 6 หลายเดือนก่อน

    Keep up the good work!

  • @taiphanvan2403
    @taiphanvan2403 ปีที่แล้ว

    Let me ask if I create a server using Docker as above, will it conflict with the server I already have. Specifically, before creating a server with Docker, I had a localhost server and was able to work on SSMS, then creating a server like that, I don't know if it will conflict? Because I see that there is currently a server running at 1433 but continue to create another server and also run on 1433, so I think there is a conflict.

    • @DatabaseStar
      @DatabaseStar  ปีที่แล้ว

      Yes, there would be a conflict. I think you'll get an error if you try to start a Docker container on the same port. You can change the port and run Docker and it should work.

  • @subhashchalapati
    @subhashchalapati 2 ปีที่แล้ว

    Thanks for your clear explanation.👍🏻

    • @DatabaseStar
      @DatabaseStar  2 ปีที่แล้ว

      No problem, glad it was helpful!

  • @GuilhermeMendesG
    @GuilhermeMendesG 2 ปีที่แล้ว +1

    What a great video. Thanks a lot!

  • @yatmanwong1008
    @yatmanwong1008 3 ปีที่แล้ว

    Perfect, I was stuck on how to connect to the server

  • @Rezzworks
    @Rezzworks 2 ปีที่แล้ว

    Thanks for your help, dude. Subscribed.

  • @reyhane4827
    @reyhane4827 2 ปีที่แล้ว

    Thanks for your clear explanation.
    i got this error what should i do????
    Error response from daemon: Ports are not available: exposing port TCP 0.0.0.0:1433 -> 0.0.0.0:0: listen tcp 0.0.0.0:1433: bind: An attempt was made to access a socket in a way forbidden by its access permissions.

    • @DatabaseStar
      @DatabaseStar  2 ปีที่แล้ว

      Hmm I'm not sure what this error means unfortunately.

  • @mohammadsirajuddin1102
    @mohammadsirajuddin1102 ปีที่แล้ว +2

    there is no microsoft sql server available now, what can i do ?

    • @DatabaseStar
      @DatabaseStar  ปีที่แล้ว

      Oh if it’s not available I guess Microsoft have removed it. They may have their own container registry like Oracle does.

  • @medazz2847
    @medazz2847 5 หลายเดือนก่อน

    Thank you I have installed on synology nas on docker but I can not access the database, here is the return message: "Microsoft.Data.SqlClient.SqlException (0x80131904): A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: TCP Provider, error: 0 - An existing connection had to be closed by the remote host).

    • @DatabaseStar
      @DatabaseStar  5 หลายเดือนก่อน

      Oh I'm not sure why that has happened. Is the database running? Is the port number correct?

    • @medazz2847
      @medazz2847 5 หลายเดือนก่อน

      @@DatabaseStar Thank you for your reply. Yes database is running and port number is correct .it is possible the synology firewall ?!

  • @rachelnavarro2897
    @rachelnavarro2897 ปีที่แล้ว

    What if I have an Encrypt option and a Trust Server Certificate options what should I choose for those 2? False or True? I'm getting an error and not able to connect to Azure. Thank you.

    • @DatabaseStar
      @DatabaseStar  ปีที่แล้ว

      Oh I’m not sure what those options mean

  • @LongTQ129
    @LongTQ129 ปีที่แล้ว +1

    great tutorial, thank you

  • @mafer5387
    @mafer5387 6 หลายเดือนก่อน

    What if I just want to connect form sql server without azure, when I try to connect doesn’t let me

    • @DatabaseStar
      @DatabaseStar  6 หลายเดือนก่อน

      You shouldn't need Azure if you're running Docker on your computer like in this video. You can connect like I have in this video.

  • @pluralvistamaar4121
    @pluralvistamaar4121 2 ปีที่แล้ว

    Thanks for the video...docker run command went well but under when docker ps, nothing is showing; even when I manually started sqlserver. (Ubuntu)

    • @DatabaseStar
      @DatabaseStar  2 ปีที่แล้ว +1

      Oh that's odd. If you type the command "docker ps -a" it will show all of the containers, even those that aren't running. It might say that your container is stopped. I think there's a way to view the docker logs to see if there are any more error messages.

    • @pluralvistamaar4121
      @pluralvistamaar4121 2 ปีที่แล้ว

      @@DatabaseStar I know, I typed docker ps -a... it exited within one second... strange behaviour. At the end, I gave up 😞

  • @rasanga_lk
    @rasanga_lk 4 หลายเดือนก่อน

    Can I try this on SQL Workbench

    • @DatabaseStar
      @DatabaseStar  4 หลายเดือนก่อน

      On MySQL Workbench? I’m not sure that supports SQL Server.

  • @kisanailsproacademyeducato7925
    @kisanailsproacademyeducato7925 2 ปีที่แล้ว +2

    _THANK YOU!! I HAVE LOOKED EVERYWHERE. I was getting a login failure. but your info fixed that.

    • @DatabaseStar
      @DatabaseStar  2 ปีที่แล้ว

      Glad I could help! I struggled for a bit to get it working as I couldn't find the right info, but I've got these videos and blog posts to help now!

  • @clareconry-murray3395
    @clareconry-murray3395 2 ปีที่แล้ว

    I got this error in Azure: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 35 - An internal exception was caught)

    • @DatabaseStar
      @DatabaseStar  2 ปีที่แล้ว

      Oh, I'm guessing there is some issue with the Docker container running or the connection details.

  • @pallavishah6665
    @pallavishah6665 2 ปีที่แล้ว +1

    Hi, I'm getting this error in Azure: Login failed for user 'sa'. Can you help?

    • @DatabaseStar
      @DatabaseStar  2 ปีที่แล้ว

      Hmm I assume the password is correct? Is it the same password as in the video? Is the docker container running (if you type "docker ps" in the terminal, does it have a status of Running or similar)?

    • @pallavishah6665
      @pallavishah6665 2 ปีที่แล้ว

      @@DatabaseStar docker ps status: connect: connection refused
      I used the password I used to set up docker

    • @pallavishah6665
      @pallavishah6665 2 ปีที่แล้ว +1

      I ran 2019 SQL Image & it worked! Thanks a lot. Very helpful video :)

    • @rostislavteryaev3894
      @rostislavteryaev3894 2 ปีที่แล้ว +1

      The password must be at least 8 characters long and contain characters from three of the following four sets: Uppercase letters, Lowercase letters, Base 10 digits, and Symbols..

  • @SomoradaneHeng
    @SomoradaneHeng ปีที่แล้ว

    hello, i got below connection error after created new database connection.
    A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 40 - Could not open a connection to SQL Server: Could not open a connection to SQL Server)

    • @DatabaseStar
      @DatabaseStar  ปีที่แล้ว

      Oh that's interesting. Are you able to connect with other editos such as SSMS?

  • @filresto
    @filresto 2 ปีที่แล้ว

    How can I get the connection string from the container that I've just created? Nice video btw!

    • @DatabaseStar
      @DatabaseStar  2 ปีที่แล้ว +1

      Thanks! I'm not sure if there's a standard connection string format, but perhaps there is some information on the image page on Docker Hub. You could also take a look at the Review tab on the Docker Hub page, I've found that to contain helpful comments from people.

  • @zaxway8619
    @zaxway8619 3 ปีที่แล้ว

    Is it normal for nothing to pop up on the screen when going to localhost:1433?

    • @DatabaseStar
      @DatabaseStar  3 ปีที่แล้ว

      Do you mean when you go to your browser and type localhost:1433? If so, then yes, that is normal. The SQL Server that is running on that port lets you connect to the database, but doesn't have anything that displays to a web browser.

  • @emekaobasi4765
    @emekaobasi4765 ปีที่แล้ว

    When I try it on SSMS, I get a login failed for user 'sa'

  • @zhangli8811
    @zhangli8811 3 ปีที่แล้ว

    A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 35 - An internal exception was caught)

    • @DatabaseStar
      @DatabaseStar  3 ปีที่แล้ว

      Hmm I’m not sure what this issue could be. Is the container running if you run “docker ps”?

    • @hyunwoosong9472
      @hyunwoosong9472 2 ปีที่แล้ว +2

      @@DatabaseStar I have same problem though, the container runs well when I run "docker ps". Can u tell me more possible causes?:)

  • @TRUTHF0RCE
    @TRUTHF0RCE 3 ปีที่แล้ว

    thank you so much!

  • @rawandarwish6110
    @rawandarwish6110 3 ปีที่แล้ว

    WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
    I got this when I downloaded the image on the terminal an when I typed docker sp nothing showed up please help

    • @rawandarwish6110
      @rawandarwish6110 3 ปีที่แล้ว

      ps*

    • @DatabaseStar
      @DatabaseStar  3 ปีที่แล้ว

      Hmm interesting. I've never seen it before. I am guessing your computer does not match what the image works on. Which computer are you running?

    • @rawandarwish6110
      @rawandarwish6110 3 ปีที่แล้ว

      @@DatabaseStar macbook pro M1

    • @garyjohnyu8285
      @garyjohnyu8285 3 ปีที่แล้ว

      same problem encounter
      mbp M1

    • @muhammetcokyaman4468
      @muhammetcokyaman4468 3 ปีที่แล้ว

      @@rawandarwish6110 macbook air M1

  • @hirabaig725
    @hirabaig725 2 ปีที่แล้ว

    on searching SQL server Docker is not displaying Microsoft SQL server.

    • @DatabaseStar
      @DatabaseStar  2 ปีที่แล้ว +1

      Hmm, it looks like Microsoft have removed it from Docker Hub, but it's on their official container repository. I'll create a video in the future on how to download it from there.

    • @DatabaseStar
      @DatabaseStar  2 ปีที่แล้ว +2

      @hirabaig725 - I just added a pinned comment: you can visit the docker page directly here: hub.docker.com/_/microsoft-mssql-server

  • @Nopeman30
    @Nopeman30 2 ปีที่แล้ว

    Hello, I looked for the image in docker hub and it does not appear

    • @DatabaseStar
      @DatabaseStar  2 ปีที่แล้ว

      Hey, that's strange, I just had a look and it's not there for me either. Hopefully it's only temporary and they haven't removed it.

    • @dajaddajad
      @dajaddajad 2 ปีที่แล้ว

      @@DatabaseStar I checked today, the Microsoft SQL Server is not there

    • @mayurbanta
      @mayurbanta 2 ปีที่แล้ว

      I too searched it, it's not there in Docker hub :(

    • @DatabaseStar
      @DatabaseStar  2 ปีที่แล้ว +1

      I just added a pinned comment: you can visit the docker page directly here: hub.docker.com/_/microsoft-mssql-server

    • @mayurbanta
      @mayurbanta 2 ปีที่แล้ว

      @@DatabaseStar thanks a lot

  • @SarchlO.Mohammed
    @SarchlO.Mohammed ปีที่แล้ว

    Hi dear. I have an issue. I lost my database connection. I want to reconnect but need help due to this message error.
    A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Could you verify that the instance name is correct and that SQL Server is configured to allow remote connections? (provider: TCP Provider, error: 40 - Could not open a connection to SQL Server: Could not open a connection to SQL Server)
    I use a MacBook Pro. Please get me on Mac, NOT Windows. I appreciate your effort.

    • @DatabaseStar
      @DatabaseStar  ปีที่แล้ว

      Thanks for the comment. Does Docker say that your SQL Server image is running? If so, are you using the same connection details mentioned during the setup?

    • @bubbles1978
      @bubbles1978 7 หลายเดือนก่อน

      I fixed it by going to Docker, container, selecting SQL and clicking the "play" button

  • @Alex-wk5gs
    @Alex-wk5gs 2 ปีที่แล้ว

    grwat video. what happens if we dont stop the database after we're done?

    • @DatabaseStar
      @DatabaseStar  2 ปีที่แล้ว

      If you don't stop the container, it is still running in the background. You'll still be able to access it.

  • @dehergnegrace4815
    @dehergnegrace4815 ปีที่แล้ว

    Thank you soooo much!

  • @vinholiver6801
    @vinholiver6801 3 ปีที่แล้ว

    NICE, thank you very much

  • @ataakaln6185
    @ataakaln6185 2 ปีที่แล้ว

    that was helpful ty

  • @vamshipatel5064
    @vamshipatel5064 2 ปีที่แล้ว

    Nice video could you do a video how to dockerize application with web app (django+sql-server)

    • @DatabaseStar
      @DatabaseStar  2 ปีที่แล้ว

      Thanks! Good idea, I don’t know a lot about that but I’ll look into it for a future video.

  • @eff1c
    @eff1c 2 ปีที่แล้ว

    Thanks)

  • @李柏翰-x3g
    @李柏翰-x3g 2 ปีที่แล้ว

    謝謝教學

  • @pantufla3227
    @pantufla3227 8 หลายเดือนก่อน

    I love you ❤

    • @DatabaseStar
      @DatabaseStar  8 หลายเดือนก่อน

      Thanks haha!

  • @delysid604
    @delysid604 3 ปีที่แล้ว +2

    is this ASMR whispering tutorial ? bro talk a bit louder pls

    • @DatabaseStar
      @DatabaseStar  3 ปีที่แล้ว

      Thanks for the feedback. The volume is lower in some of these videos but I’ve fixed some settings and they are a better in my recent videos.

  • @LynnHaas-o3n
    @LynnHaas-o3n ปีที่แล้ว +1

    This is a fantastic tutorial. Thank-you for putting it together.
    I am getting similar errors listed below where you can't connect to the database. The database did not spin up when typing docker ps. When I checked Docker, it had exited with this error: "ERROR: Unable to set system administrator password: Password validation failed. The password does not meet SQL Server password policy requirements because it is too short. The password must be at least 8 characters." despite the fact that I set the password to: P$de9876-m4. Suggestions?

    • @LynnHaas-o3n
      @LynnHaas-o3n ปีที่แล้ว

      Apparently, it doesn't like the $ in my password. Changed that one symbol and now it works. Documenting here for others that may get the error in Azure: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 35 - An internal exception was caught) or notice issues with password.

    • @DatabaseStar
      @DatabaseStar  ปีที่แล้ว +1

      You're welcome, I'm glad you found it useful!
      Thanks for sharing the error you got and sharing the solution in the reply. I wasn't aware of that, so it's good to know.