How to Set Up SQL Server Database with Docker

Поделиться
HTML-код
  • Опубликовано: 18 окт 2024

Комментарии • 117

  • @DatabaseStar
    @DatabaseStar  Год назад +34

    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!

  • @Zeadar
    @Zeadar 2 месяца назад +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.

  • @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

  • @rezwanahmed288
    @rezwanahmed288 Год назад +2

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

  • @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.

  • @noblenetdk
    @noblenetdk 3 месяца назад

    Keep up the good work!

  • @keeponwishing3856
    @keeponwishing3856 8 месяцев назад

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

  • @medazz2847
    @medazz2847 2 месяца назад

    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  2 месяца назад

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

    • @medazz2847
      @medazz2847 2 месяца назад

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

  • @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.

  • @longtranquang2508
    @longtranquang2508 Год назад +1

    great tutorial, thank you

  • @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 3 месяца назад

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

  • @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

  • @mafer5387
    @mafer5387 3 месяца назад

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

    • @DatabaseStar
      @DatabaseStar  3 месяца назад

      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.

  • @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.

  • @Rezzworks
    @Rezzworks 2 года назад

    Thanks for your help, dude. Subscribed.

  • @phanvantai2521
    @phanvantai2521 Год назад

    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.

  • @GuilhermeMendesG
    @GuilhermeMendesG 2 года назад +1

    What a great video. Thanks a lot!

  • @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?

  • @subhashchalapati
    @subhashchalapati 2 года назад

    Thanks for your clear explanation.👍🏻

    • @DatabaseStar
      @DatabaseStar  2 года назад

      No problem, glad it was helpful!

  • @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 5 месяцев назад

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

  • @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!

  • @yatmanwong1008
    @yatmanwong1008 2 года назад

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

  • @rasangalakshith1131
    @rasangalakshith1131 Месяц назад

    Can I try this on SQL Workbench

    • @DatabaseStar
      @DatabaseStar  Месяц назад

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

  • @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.

  • @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 😞

  • @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..

  • @TRUTHF0RCE
    @TRUTHF0RCE 2 года назад

    thank you so much!

  • @dehergnegrace4815
    @dehergnegrace4815 Год назад

    Thank you soooo much!

  • @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.

  • @emekaobasi4765
    @emekaobasi4765 10 месяцев назад

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

    • @DatabaseStar
      @DatabaseStar  10 месяцев назад

      Is it the right password?

  • @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 2 года назад

      @@rawandarwish6110 macbook air M1

  • @hirabaig725
    @hirabaig725 Год назад

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

    • @DatabaseStar
      @DatabaseStar  Год назад +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

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

  • @ataakaln6185
    @ataakaln6185 2 года назад

    that was helpful ty

  • @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.

  • @vinholiver6801
    @vinholiver6801 2 года назад

    NICE, thank you very much

  • @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 Год назад

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

    • @DatabaseStar
      @DatabaseStar  Год назад +1

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

    • @mayurbanta
      @mayurbanta Год назад

      @@DatabaseStar thanks a lot

  • @zhangli8811
    @zhangli8811 2 года назад

    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 года назад

      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?:)

  • @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.

  • @eff1c
    @eff1c 2 года назад

    Thanks)

  • @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.

  • @pantufla3227
    @pantufla3227 6 месяцев назад

    I love you ❤

  • @李柏翰-x3g
    @李柏翰-x3g 2 года назад

    謝謝教學

  • @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.