Run SQL Server in a Docker Container - SQL Server Anywhere!

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

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

  • @RDT
    @RDT  3 года назад +5

    Update for M1 Macs (Apple Silicon): as of July 2021 the following command works (note the change of image):
    docker run -d \
    -p 1433:1433 \
    -e "ACCEPT_EULA=Y" \
    -e "SA_PASSWORD=P@ssword1" \
    --platform linux/arm64 \
    --name docker-sql \
    mcr.microsoft.com/azure-sql-edge
    Tested on an M1 MacBook Air base model. Will post an updated video if we can find a mainstream image that works.

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

      Just wanted to confirm - I'm an Apple M1 User and managed to run and connect to the instance problem free :) You have earned my subscription sir

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

      Thanks for the sub! Glad to hear it helped you

    • @matiass.3527
      @matiass.3527 2 года назад

      Genio!! muchas gracias por este gran dato

  • @sudeokur8308
    @sudeokur8308 3 года назад +2

    IM SO THANKFUL FOR YOU!!! I'M TRYING TO DO THIS FOR ONE WEEK AND I WAS SO UPSET IM SO HAPPY TO SEE YOUR VIDEO!!!!! THANK YOU VERY MUCH YOU'RE THE BEST

  • @mudsweatandtrails
    @mudsweatandtrails 3 года назад +2

    Superb. I'll be giving this a try later

    • @RDT
      @RDT  3 года назад

      Great! Let us know how you get on 😊

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

    Thankyou, really helped me get started

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

      Glad it was helpful for you 🙏

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

    This actually works.

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

      😀

  • @geoffwatson
    @geoffwatson 3 года назад +1

    Great video - thank you. I currently access my Windows based SQL Server through VBA within MS Excel - can I access a docker version on a Mac this way?

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

      Connection strings should just work as usual, where the server is running (whether in a Windows SQL server or in a Docker image) should be transparent to the consuming application. The bigger question is whether VBA in Excel will work on the Mac…?

  • @harisejaz4295
    @harisejaz4295 3 года назад +1

    Hi I have a couple of questions.
    1. Once we created the container, do we need to create it again as for me, it just disappers from the docker dashbaord.
    2. Im getting the following error when creating the connection: A connection was successfully established with the server, but then an error occurred during the pre-login handshake.

    • @RDT
      @RDT  3 года назад

      Hi Haris, thanks for watching.
      1) You shouldn't need to no. Once the container exists you can just start it up again using "docker start containername". If you run "docker ps -a" on the command line you should see a list of all running and non-running containers
      2) Did you set the accept eula environment variable?

    • @harisejaz4295
      @harisejaz4295 3 года назад

      @@RDT could you give me your email or something I could contact on? I really need this fixed as I have assignments coming up. Please I would be really appreciative.

  • @timhulak5105
    @timhulak5105 3 года назад +1

    Thank you so much! This video has helped me along more than the other dozen I have watched. However, I am getting an error when I attempt to connect. It says "Connection Error: Login failed for user 'sa'." Are you able to help?

    • @RDT
      @RDT  3 года назад +1

      That may be as straightforward as you having the wrong password for SA, how did you set up the password?

  • @gowthams1584
    @gowthams1584 3 года назад +1

    Hi Robert,
    I am using latest Macbook pro M1 chip version 11.5.2 and It doesn't work for me and I also used the another link u mentioned in below amrita's comment and it's mentioned like this :

    • @RDT
      @RDT  3 года назад

      Hi, what is the error you are receiving?

  • @amritasrivastva
    @amritasrivastva 3 года назад +1

    Helpful video! Have you tried installing SQL Server on Mac with M1 chip? The container starts and exits on my MacBook with M1.

    • @RDT
      @RDT  3 года назад +1

      Thanks Amrita, glad you liked it! No we've not got an M1 in the office (yet..), but we have heard some of the Docker support isn't quite there yet. Which version of Docker Desktop are you running? Looks like theres a new version here: docs.docker.com/docker-for-mac/apple-silicon/ we'd be interested to hear how you get on?
      Also, found this which may be helpful: medium.com/geekculture/docker-express-running-a-local-sql-server-on-your-m1-mac-8bbc22c49dc9 (but not tried it)

    • @amritasrivastva
      @amritasrivastva 3 года назад +1

      @@RDT Thank you for your quick response 😊! I am running the newest version i.e. Docker Desktop 3.3.1(the one that you provided the link to). Since not all Intel versions are yet supported by Docker for M1 Mac, SQL Server might not be working. I will try the alternative you provided the link to and let you know if it works.
      Thanks again for your help and please let me know when you try it with M1.

    • @kiaktak1535
      @kiaktak1535 3 года назад

      @@RDT didn't work (

    • @chathukaviduranga
      @chathukaviduranga 3 года назад +1

      @@RDT thank you a lot i don't have words to convey my gratitude. It worked. Thank you

    • @RDT
      @RDT  3 года назад +1

      Great! So glad it helped you

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

    what are the libraries to use in dotnet for mac if i want to work with sql server 2019 container on mac m1 ?

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

      Hi Moshiko - a SQL connection or ORM, such as EF Core (Entity Framework) will do the trick as it’s just a connection string

  • @phankhoa7005
    @phankhoa7005 3 года назад

    How to access sql server in docker container from outside network? I mean not "local host"

  • @geoffwatson
    @geoffwatson 3 года назад

    Error message says it's not the correct image for my platform: WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
    534ef0a13d0a9060502530775030e98850d1192555305869d0fd33c1e264c669 - I'm running MAC with APPLE M1 chip

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

      Hi have you tried the following (note the change of image):
      docker run -d \
      -p 1433:1433 \
      -e "ACCEPT_EULA=Y" \
      -e "SA_PASSWORD=P@ssword1" \
      --platform linux/arm64 \
      --name docker-sql \
      mcr.microsoft.com/azure-sql-edge
      Tested on an M1 MacBook Air base model.

  • @hee1ko442
    @hee1ko442 3 года назад +1

    in my case, it only worked when I droped :2019-latest

    • @RDT
      @RDT  3 года назад

      Thats good to know Hee1ko, thanks. What platform are you on?

    • @hee1ko442
      @hee1ko442 3 года назад +1

      @@RDT I’m using macOS big sur v 11.4

    • @RDT
      @RDT  3 года назад

      Thanks! M1 or Intel?

    • @hee1ko442
      @hee1ko442 3 года назад +1

      It’s Intel! Macbook pro 2017

  • @victorshongwe7011
    @victorshongwe7011 3 года назад

    Help, it's not working

    • @RDT
      @RDT  3 года назад

      Hi Victor, please can you explain the errors you are recieving

    • @chunbinzheng8205
      @chunbinzheng8205 3 года назад

      @@RDT hi, I have the same issue here where the docker-sql runs for few seconds and stopped. and inside message says: the EULA must be accepted before SQL, where can I accept the EULA? Thanks

    • @RDT
      @RDT  3 года назад

      Hi Chunbin, you can set an environment variable in the container to accept the EULA with the parameter -e “ACCEPT_EULA=Y”