I run SQL Server docker image with --platform linux/amd64 flag and Azure Data Studio on Mac OS. Works pretty well. Far less hassle than a VPS, no need to worry about your data leaving your machine.
@@Mikewendwosen instead of `server=.` you write `server=localhost,1234` where 1234 is the port which you specified your sql server is running in container
Damn! I thought there was a better native Mac solution for SQL Server in the pipeline when I spotted your video. Slightly disappointing that it wasn't the case, but a good video nonetheless. 👍 Annoyingly, I've just discovered that Microsoft have, as of September 2023, dropped support for ARM64 with Azure SQL Edge server, meaning the version numbers are now different between Mac/Windows and backups can no longer be exchanged if you use both a Windows and a Mac M1/M2 device.
Great video. My solution for this was to use Sql Azure Edge on Docker - runs natively on Arm, and while there IS an overhead for runnig Docker, I'm usually running docker anyway
I run all my dependencies in Docker via Compose files. Can check that in with the code. Map volumes to store state locally. Have never been happier. ☺️
Yep, if all you need is just a subset of functionality that SQL Server offers, like a relational db, then your approach is great! I made a video about this last year too.
In my testing running SQL Server 2022 through Rosetta had better performance than SQL Azure Edge. This was for large datasets for a data warehouse approaching 1TB of compressed data. However, keep in mind, that Apple does some funky disk things with writes where it doesn't actually write when it says it does. If you're working with large datasets you'll see disk performance slow significantly over time. You can see this if you run FIO tests with large data files in the Docker container vs FIO tests outside the Docker container when you use direct writes bypassing the disk caching.
@@weiln12 In my case, I have not been bothered about that. But I get that some people are. Been using Azure Data Studio. It is really becoming a good tool managing a lot of data sources.
Why not just get a tiny desktop (one of those cheap ones like 1L thinkcentres from corporate liqudations they do every three years), install windows on it and set it up with zerotier to remote into it? It would probably cost less in the longterm and you'd most likely get better performance.
Could even install ubuntu if you don't want to spend a license, though mostly they do come with a windows license. U run such a setup with UNRAID and docker images. Old Lenovo m93p with an 4th gen I7 and 32GB ram. Besides my SQL server it also hosts my PLEX server, Minecraft server, and even my TimeMachine network backup and many more services.
I went this route at first for my local copy of the database, but ended up wanting SSMS instead of Azure Data Studio to connect to my remote production database. Eventually Parallels became my choice so I could use the Windows version of Visual Studio instead of VS for Mac. I don't love the new subscription license, but it seems to be on par with the pricing of this VPS.
🎯 Key Takeaways for quick navigation: 00:13 💡 Using Docker can significantly streamline both front-end and back-end development by enabling hot reloading. 01:26 🔄 Docker init automates the creation of Docker files, speeding up the setup process. 02:09 ✂️ Customizing Docker files for development can bypass the need for manual configuration. 03:33 🕵️ Docker can detect and scaffold configurations for different types of projects automatically. 04:01 🔄 Docker compose watch allows developers to maintain hot reloading capabilities for containerized apps. 05:37 🛠️ The watch command in Docker provides a dynamic development environment by restarting services as file changes are detected. Made with HARPA AI
My current setup from my M2 MacBook is, docker + SQL Server 2022 and/or Azure Edge, then for browser Azure Data Studio, for my IDE I use Rider…. .Net development under apple silicon is a breeze. Windows envi. Is already dead for me and i’m not going back to windows.
I used an IONOS VPS when I was in college and when I did my master degree. Considering I used to move between cities and I had desktops in both(I couldn't cary one of the around) I didn't wanted to export/import the db each time I was moving so I bought a VPS, setup a MariaDB, two datbases: dev_db and live_db(that's howI call prod, live), connected my Laravel code to them and it workerd sooo nice. I had the same data everywhere regardless from where I was accessing/working on the app. Also the VPS was pretty slow, but it wasn't a problem because thanks to it being slow I could test the loading UI/UX whitout doing setTimeouts with promises in Vue.
Its perfect to run as an public server or if you have a public website connected to it. I just run an UNRAID server on an old SFF PC and a SQL docker image in my local network.
So, of the titles you suggested , this was the only one that was really true (except Schwarzenegger) since you are not really running SQL Server on Apple Silicon. In fact you could just set up a local Windows Server on a cheap Intel box to achieve the same results. However, I’m not sure, in the long run, that this solution isn’t easier and cheaper. If this existed (at these prices) 15 years ago, when I was doing Dot NET stuff, I would have saved thousands of dollars.
Schwarzenegger agrees :) The solution I offered here is for ultimate portability. If portability is not necessary, then a cheap windows box will do. If all you need is a simple relational db, then SQL Edge will work too.
@@AZisk You don’t Know how much time and money this would have saved me years ago. But “spinning up” a Windows server, let alone SQL was an expensive proposition.
We all know this is a sponsored video from Ionos. That's totally fine as we all need to put food on the table. That being said Azure, AWS and Google Cloud provide a free VM for 12 months.
SQL Server 2022 Developer Edition does install on Windows 11 ARM, but "some assembly" is required post-installation, i.e. fixing missing folder and registry permissions, and restoring and rebulding missing master and temp dbs
another option that is officially, although implicitly, fully supported on Windows 11 ARM is SQL Server 2022 Express LocalDB. Installs without any problems and can be used with SSMS.
@@AZisk no, there is azure sql edge docker image, it's basically Microsoft sql server, without some additional sql features like reporting services etc.
@@geostelyes. in the video I mention specifically why I use SQL Server over the other options. I think I’m repeating myself. omg. how did we get into this loop. basically, sql edge offers a small subset of functionality that sql server has. if that is enough for you, then the docker solution is great. i made a video about sql edge last year for those that need just a little bit of sql sprinkled in :)
@@AZisk oh, sorry,seems I looked video not very carefully and that’s why I suggested SQL edge:) thanks for a good video, it would be useful to a lot of devs since a lot of developers have struggle with installing and configuring sql server for their tasks
No, pretty much the same :) I tried this with Azure VM and it works just as well. The setup with Azure is more powerful, but also much more complex, but if you're comfortable in the Azure Portal, you'll be fine.
Already tried using remote SQL Server on my M1 parallels windows, but it's a pain. Switched back to Windows laptop. I thought you really found something.
It's not as good as using a dedicated Windows based workstation, you're right. But it's a solution for those using an Apple Silicon machine (just like the title says :)
Docker does nothing to help run x64 software on a Windows ARM VM. If you mean running another package that is NOT SQL Server (SQL Edge for example), then sure. But it doesn't have all the features that I want
Im studying computer (hardware/software) engineering and I need to buy a laptop. I want to get a macbook but I dont know if all the software im gonna be using is supported on mac. What do I do, do I just go for a windows laptop?
It is also possible to run SQL Server in a Parallels VM under Windows 11 Arm64! Took me a while to get this running but after all it is a good option and running like a charm. If someone is interested in how to get this running, I can post the few necessary steps
Thanks for the fast reply! The problem i’m facing is, that i need to perform some tasks on MSSQL Dbs for my Labs in university. I currently have an m1 Air and i was about to upgrade to a 14 inch pro. Now i am not sure if i can perform all the tasks on that machine and i am really unsure if i should get a windows Maschine. For the lab an installation of ssms and localdb is required. So far i was able tu install both in my m1 air
Rule #1. Never expose RDP to the internet. BIG Rule. Please use tailscale or zerotier to access your server instead. RDP has had to many vulnerabilities in the past, include pre-auth zero-days.
Internet is full of hacked servers because people blindly follow UA-cam videos that don't take security into account and just say "don't do this at home" or "don't do this in production". But there is never any followup video on how to do it the right way. Why not just show the right way to do it? It's not that hard to get a good developer experience without exposing your DATABASE server to the internet. In fact you could get a sponsorship for the video that shows a security tool that manages that
What about video how to run Oracle db on silicon? Without Colima. I use Colima which is linux vm optimized for containers. Super simple. Maybe a bit buggy sometimes. But works for me to run Oracle on M1. And it is slower than native app of course. You can probably run sql server in Colima if there is a docker container for Linux.
Unless you spend a lot of time working at the coffee shop! 😂Just build a small pc for a virtual server and use ADS on the Mac to work with it. These are the things you need to know!
It’s good to have options. I’ve got SQL Edge in Docker for local dev on my Mac, but also have a full Windows box in the cloud on Windows 365. Also have a local Parallels Windows 11 machine. I do most windows dev from the windows 365 box and connect to it from my Mac, Surface Pro, iPad etc. Even iPhone can output a full resolution (eg 3440x1440) to an external display for a DeX like experience (albeit running remotely via RDP)
why not just get a cheao-ish pc locally and run it? Not really a solution if you ask me. 1) its been around for ages so nothing new; 2) over the longer period will be more costly; 3) bandwidth might be an issue depending on your connection. tsk tsk Alex.
I run SQL Server docker image with --platform linux/amd64 flag and Azure Data Studio on Mac OS. Works pretty well. Far less hassle than a VPS, no need to worry about your data leaving your machine.
same here, not too hard either
how do you writ e the connection string for it I am confused
@@Mikewendwosen you map container port 1433 SQL port to some local port, and connect to localhost:mapped port
@@Mikewendwosen instead of `server=.` you write `server=localhost,1234` where 1234 is the port which you specified your sql server is running in container
For IDE I use DBeaver is better and you have multi database in one IDE
Damn! I thought there was a better native Mac solution for SQL Server in the pipeline when I spotted your video. Slightly disappointing that it wasn't the case, but a good video nonetheless. 👍
Annoyingly, I've just discovered that Microsoft have, as of September 2023, dropped support for ARM64 with Azure SQL Edge server, meaning the version numbers are now different between Mac/Windows and backups can no longer be exchanged if you use both a Windows and a Mac M1/M2 device.
Great video. My solution for this was to use Sql Azure Edge on Docker - runs natively on Arm, and while there IS an overhead for runnig Docker, I'm usually running docker anyway
I run all my dependencies in Docker via Compose files. Can check that in with the code. Map volumes to store state locally. Have never been happier. ☺️
Yep, if all you need is just a subset of functionality that SQL Server offers, like a relational db, then your approach is great! I made a video about this last year too.
In my testing running SQL Server 2022 through Rosetta had better performance than SQL Azure Edge. This was for large datasets for a data warehouse approaching 1TB of compressed data. However, keep in mind, that Apple does some funky disk things with writes where it doesn't actually write when it says it does. If you're working with large datasets you'll see disk performance slow significantly over time. You can see this if you run FIO tests with large data files in the Docker container vs FIO tests outside the Docker container when you use direct writes bypassing the disk caching.
@@weiln12 In my case, I have not been bothered about that. But I get that some people are. Been using Azure Data Studio. It is really becoming a good tool managing a lot of data sources.
@@AZisk yeah - I remember it, great video - I sent that around my team to try and convince them - and a few did 🙂
Why not just get a tiny desktop (one of those cheap ones like 1L thinkcentres from corporate liqudations they do every three years), install windows on it and set it up with zerotier to remote into it? It would probably cost less in the longterm and you'd most likely get better performance.
yes, this is another option
Could even install ubuntu if you don't want to spend a license, though mostly they do come with a windows license.
U run such a setup with UNRAID and docker images. Old Lenovo m93p with an 4th gen I7 and 32GB ram.
Besides my SQL server it also hosts my PLEX server, Minecraft server, and even my TimeMachine network backup and many more services.
Nice , never heard about zerotier
I just stick to PostgreSQL, don't see the need to use Microsoft SQL Server, developer or otherwise. Thanks for the video, as always, quality stuff.
Hi Alex, running MS SQL Server in docker with Rosetta emulation could also be a solution
I went this route at first for my local copy of the database, but ended up wanting SSMS instead of Azure Data Studio to connect to my remote production database. Eventually Parallels became my choice so I could use the Windows version of Visual Studio instead of VS for Mac. I don't love the new subscription license, but it seems to be on par with the pricing of this VPS.
🎯 Key Takeaways for quick navigation:
00:13 💡 Using Docker can significantly streamline both front-end and back-end development by enabling hot reloading.
01:26 🔄 Docker init automates the creation of Docker files, speeding up the setup process.
02:09 ✂️ Customizing Docker files for development can bypass the need for manual configuration.
03:33 🕵️ Docker can detect and scaffold configurations for different types of projects automatically.
04:01 🔄 Docker compose watch allows developers to maintain hot reloading capabilities for containerized apps.
05:37 🛠️ The watch command in Docker provides a dynamic development environment by restarting services as file changes are detected.
Made with HARPA AI
My current setup from my M2 MacBook is, docker + SQL Server 2022 and/or Azure Edge, then for browser Azure Data Studio, for my IDE I use Rider…. .Net development under apple silicon is a breeze. Windows envi. Is already dead for me and i’m not going back to windows.
I used an IONOS VPS when I was in college and when I did my master degree. Considering I used to move between cities and I had desktops in both(I couldn't cary one of the around) I didn't wanted to export/import the db each time I was moving so I bought a VPS, setup a MariaDB, two datbases: dev_db and live_db(that's howI call prod, live), connected my Laravel code to them and it workerd sooo nice. I had the same data everywhere regardless from where I was accessing/working on the app.
Also the VPS was pretty slow, but it wasn't a problem because thanks to it being slow I could test the loading UI/UX whitout doing setTimeouts with promises in Vue.
Those Microsoft SQL Server - Ubuntu based images provided by Microsoft work just fine for me.
Isnt there a docker image that works
Dang, I feel sorry for .NET devs
Docker works great and takes less to setup.
Its perfect to run as an public server or if you have a public website connected to it.
I just run an UNRAID server on an old SFF PC and a SQL docker image in my local network.
I’m using sql server docker container with compatibility mode on docker desktop for running X86 container on arm
So, of the titles you suggested , this was the only one that was really true (except Schwarzenegger) since you are not really running SQL Server on Apple Silicon. In fact you could just set up a local Windows Server on a cheap Intel box to achieve the same results. However, I’m not sure, in the long run, that this solution isn’t easier and cheaper. If this existed (at these prices) 15 years ago, when I was doing Dot NET stuff, I would have saved thousands of dollars.
Schwarzenegger agrees :) The solution I offered here is for ultimate portability. If portability is not necessary, then a cheap windows box will do. If all you need is a simple relational db, then SQL Edge will work too.
@@AZisk You don’t Know how much time and money this would have saved me years ago. But “spinning up” a Windows server, let alone SQL was an expensive proposition.
Nice video. Looks pretty cool for someone who is out and about to seamlessly access their sql database.
You my friend get it! If I want to be remote, this is the way to go.
We all know this is a sponsored video from Ionos. That's totally fine as we all need to put food on the table. That being said Azure, AWS and Google Cloud provide a free VM for 12 months.
SQL Server 2022 Developer Edition does install on Windows 11 ARM, but "some assembly" is required post-installation, i.e. fixing missing folder and registry permissions, and restoring and rebulding missing master and temp dbs
another option that is officially, although implicitly, fully supported on Windows 11 ARM is SQL Server 2022 Express LocalDB. Installs without any problems and can be used with SSMS.
What's problem use Docker container with DataGrip & Rider?
No problem with Docker if you aren't running full SQL Server, which is what I want to use here.
I am really surprised, why do not use Azure Edge Docker VM ? 😅 works like a charm for me. It’s the same like an azure sql database.
In the video, I mention why I use SQL Server over the other sql services.
@@AZisk no, there is azure sql edge docker image, it's basically Microsoft sql server, without some additional sql features like reporting services etc.
@@geostelyes. in the video I mention specifically why I use SQL Server over the other options. I think I’m repeating myself. omg. how did we get into this loop. basically, sql edge offers a small subset of functionality that sql server has. if that is enough for you, then the docker solution is great. i made a video about sql edge last year for those that need just a little bit of sql sprinkled in :)
@@AZisk oh, sorry,seems I looked video not very carefully and that’s why I suggested SQL edge:) thanks for a good video, it would be useful to a lot of devs since a lot of developers have struggle with installing and configuring sql server for their tasks
Sorry, I rewatched the introduction. My brain missed that you actually mentioned that.
I truly enjoyed this video Alex, thanks for doing .NET stuff 😅
Glad you enjoyed it!
100% coolest dude that's rocking that VS white theme
I old-school default it all the way! Visual Studio just doesn't look right in the new dark theme.
Wake me up when SQL Management Studio is available for my Mac...And no...Not Azure Data Studio..
you’re going to be sleeping for a while 😆
Microsoft is sleeping too. How much this can cost them to compile for ARM.
I believe they would retire ssms some day, like they killed vs for mac
Isn't Docker available to do this too?
I installed SQL Server with Docker and it works.
Are you sure about that? Or is it SQL server Edge?
Oof, checked every thing 4 times... still can't connect to the sql server from ssms remotely. 😥
You pronounce it "Postgres", the DBMS' traditional name. The QL was branding added at one point but it is silent.
can't wait to try this! Thanks Alex 🙌
Alex, is it different than using an Azure VM?
No, pretty much the same :) I tried this with Azure VM and it works just as well. The setup with Azure is more powerful, but also much more complex, but if you're comfortable in the Azure Portal, you'll be fine.
Already tried using remote SQL Server on my M1 parallels windows, but it's a pain. Switched back to Windows laptop. I thought you really found something.
It's not as good as using a dedicated Windows based workstation, you're right. But it's a solution for those using an Apple Silicon machine (just like the title says :)
@@AZiskYeah. I will keep on following you to know what have you found better for us. Thank you for all the hustle and great videos.
wht dont you use just docker
Docker does nothing to help run x64 software on a Windows ARM VM. If you mean running another package that is NOT SQL Server (SQL Edge for example), then sure. But it doesn't have all the features that I want
Why not user on Docker?
what about docker? and connect sql management studio on docker?
I use distrobox with Ubuntu 22.04 and run SQL server on in that container.
Why cant you use Azure VM and have SQL installed on it. Not sure if you have considered this?
yes i have. $$$$$
@@AZisk yes I thought so. Thanks for the fast reply
Im studying computer (hardware/software) engineering and I need to buy a laptop. I want to get a macbook but I dont know if all the software im gonna be using is supported on mac. What do I do, do I just go for a windows laptop?
Use Windows and Linux (ubuntu or any other) in one laptop
Running a docker image with azure studio does the trick
Not exactly. I run SQL Server, not SQL Edge
It is also possible to run SQL Server in a Parallels VM under Windows 11 Arm64! Took me a while to get this running but after all it is a good option and running like a charm. If someone is interested in how to get this running, I can post the few necessary steps
Yes please! That would be so helpful
isn’t it possible to install sql server in windows running on parallels?
I'm afraid not. Windows for ARM doesn't do a good job yet of translating x64 to ARM on the fly.
Thanks for the fast reply! The problem i’m facing is, that i need to perform some tasks on MSSQL Dbs for my Labs in university. I currently have an m1 Air and i was about to upgrade to a 14 inch pro. Now i am not sure if i can perform all the tasks on that machine and i am really unsure if i should get a windows Maschine. For the lab an installation of ssms and localdb is required. So far i was able tu install both in my m1 air
Another Way is using Colima, little tweaking at the qemu config, and run the sql server 2022 x64 Docker Container…
i don’t know about Colima. Do you have any info on this?
Please make video on "Linux and C# Dev Kit" with Visual Studio Code.
But there is a Docker image, is the image not ARM compatible?
Yes, for SQL Edge. Microsoft and their naming :)
Rule #1. Never expose RDP to the internet. BIG Rule. Please use tailscale or zerotier to access your server instead. RDP has had to many vulnerabilities in the past, include pre-auth zero-days.
for mission critical environments, absolutely right
Internet is full of hacked servers because people blindly follow UA-cam videos that don't take security into account and just say "don't do this at home" or "don't do this in production". But there is never any followup video on how to do it the right way. Why not just show the right way to do it? It's not that hard to get a good developer experience without exposing your DATABASE server to the internet. In fact you could get a sponsorship for the video that shows a security tool that manages that
What about video how to run Oracle db on silicon? Without Colima. I use Colima which is linux vm optimized for containers. Super simple. Maybe a bit buggy sometimes. But works for me to run Oracle on M1. And it is slower than native app of course. You can probably run sql server in Colima if there is a docker container for Linux.
I've always used SQL Server, and not familiar with Oracle administraion.
That letter throw to yourself is messing with my head...
AI-face on a friend?
Well, a VM deployed in Azure would have been a (more expensive) solution too :-D
That's right. Azure VM works also, but like you said, more expensive for sure.
Why not VPS with Linux (cheaper than Windows) and SQL Server running in it?
another option. Windows lets me host other things like a dev environment and IIS
True. I would love to experiment it with Linux and .NET Core @@AZisk
Unless you spend a lot of time working at the coffee shop! 😂Just build a small pc for a virtual server and use ADS on the Mac to work with it. These are the things you need to know!
It’s good to have options.
I’ve got SQL Edge in Docker for local dev on my Mac, but also have a full Windows box in the cloud on Windows 365. Also have a local Parallels Windows 11 machine.
I do most windows dev from the windows 365 box and connect to it from my Mac, Surface Pro, iPad etc.
Even iPhone can output a full resolution (eg 3440x1440) to an external display for a DeX like experience (albeit running remotely via RDP)
docker, azure data studio, vs code
You only need Browser service over UDP if you have a named instance. If not, turn it off.
thanks!
Schwarzenegger is still the better title 🤷🏻♂️ - change my mind
Somebody already tried to hack the db?
Haha. I deleted it after this video :)
Literally just an ad
Scratches head! Azure?!?
Azure has VMs yes. A bit more expensive, but same idea
why not just get a cheao-ish pc locally and run it? Not really a solution if you ask me. 1) its been around for ages so nothing new; 2) over the longer period will be more costly; 3) bandwidth might be an issue depending on your connection. tsk tsk Alex.
yes, buying another PC is an option too. A VPS is a portable solution though.
is docker a joke to you?
am i a joke to docker?
@@AZisk just saying. If it's just for development purpose
im all about that development purpose
I was not first
Me neither
seems like you WERE🎉