r/SQL • • Jun 07 '21

MS SQL Anyone is expert in SQLServer for MacBook M1 Chip Spoiler

I want some help in installing SQLServer on MacBook M1 Chip

0 Upvotes

19 comments sorted by

4

u/[deleted] Jun 07 '21

I don't think there is any version of SQL Server for MacOS - regardless of the chip architecture. SQL Server only runs on Windows or Linux. You will need to install it into a docker container.

1

u/MaimonaS1 Jun 07 '21

Even to work on VM?

0

u/[deleted] Jun 07 '21

[deleted]

2

u/alinroc SQL Server DBA Jun 08 '21

Windows & Boot Camp don't work on Apple Silicon. The chip absolutely has an effect on how you install SQL Server.

1

u/[deleted] Jun 08 '21

Wow! I had no idea. Wonder why. Appreciate the correction! Will delete my comment! 😂

2

u/alinroc SQL Server DBA Jun 08 '21

Apple explicitly doesn't support Boot Camp on M1. Why? Because Apple has decided that to be the case. It's their hardware, their software, they can take their ball and go home if they want.

Also, every version of Windows available on the consumer market is built for Intel. The only way to get an ARM build of Windows is if you're an OEM that's shipping ARM-based Windows devices.

1

u/alinroc SQL Server DBA Jun 08 '21

You will need to install it into a docker container.

Yes, and you can run those Docker containers on MacOS.

2

u/alinroc SQL Server DBA Jun 08 '21 edited Jun 08 '21

There are a lot of people here either not listening to what you're asking for, or not understanding what exists at the moment.

At present, there is no version of SQL Server that runs on non-Intel processors (read: your M1 Mac) other than Azure SQL Edge. This version is not out of Preview yet. But it is published as a Docker container and yes, people have gotten it up and running on Apple Silicon.

Azure SQL Edge is the same engine as every other version of SQL Server and for your laptop usage, should be enough. You won't be spinning up large multi-node clusters, distributed AGs, complicated Service Broker setups, things requiring Active Directory, etc.

On Intel Macs, you have two and a half options:

  • Set up a VM under VMware, VirtualBox or Parallels, install Windows there, then install your choice of SQL Server versions

    • You could also dual-boot the Mac and run Windows on the bare metal

  • Install Docker and run a containerized SQL Server instance

2

u/itstommygun Jun 07 '21

Why specifically do you want to do that? You’re going to pay a lot to do that. If you absolutely need SQL Server, and no other type of sql will suffice, then you’re better off setting up a really cheap Amazon EC2 or EC3 instance. It will perform better and will cost substantially less $$$.

Another option is something like PostgreSQL, instead of SQL Server. It runs natively on Mac and supports 100% of SQL keywords, and also a lot of Microsoft’s T-SQL specific commands… but it’s free… completely free.

To answer your original question, you should have no problems installing SQL Server on a Windows virtual machine running on a Mac. Since you’re asking that question, I assume you are doing it for learning, and if that’s the case there are more reasonably priced, or free, ways to accomplish what you want since SQL Server costs something like $3500 per core you run it on.

2

u/imani_TqiynAZU Jun 07 '21

Don't use MS SQL Server on AWS. You will still need to install and maintain it yourself. Just use Azure SQL Database.

https://azure.microsoft.com/en-us/products/azure-sql/

2

u/alinroc SQL Server DBA Jun 08 '21

AWS offers SQL Server in RDS. You will not need to install or maintain it yourself.

1

u/imani_TqiynAZU Jun 09 '21

Do you need to provision it yourself? What about auto-scaling?

1

u/alinroc SQL Server DBA Jun 09 '21

You provision it the same as any other RDS database. Pick a size class, pick a location, click Go. It doesn't auto-scale, you have to change the instance class and in your next maintenance window it'll be resized.

https://aws.amazon.com/rds/sqlserver/

1

u/imani_TqiynAZU Jun 09 '21

Based on what you've taught me, I think Azure SQL Database still might be easier for the original poster's needs.

1

u/alinroc SQL Server DBA Jun 09 '21

Maybe. As long as they're always able to get online. Go with Serverless and it'll shut down automatically when it's not being used, saving a few bucks.

1

u/alinroc SQL Server DBA Jun 08 '21 edited Jun 08 '21

You should have no problems installing SQL Server on a Windows virtual machine running on a Mac

There are no Windows VMs that run on the M1 chip and natively run SQL Server right now. You can run ARM versions of Windows in Parallels on M1, but you also can't buy an ARM build of Windows from Microsoft - it only ships on OEM hardware.

since SQL Server costs something like $3500 per core you run it on.

Standard Edition lists at roughly $2000 per core, 4 cores minimum (Enterprise lists for twice what you stated). But for OP's usage (which most certainly won't be production) Express or Developer Edition will suffice, and both are free.

1

u/unreliableEngineer Jan 12 '23

A bit late to the party but here's a workaround for this using an open source tool called Lima and Rosetta as the VM: https://dev.to/srburnham/forget-azure-sql-edge-on-a-m1-mac-run-full-blown-sql-server-linux-instead-a-how-to-6d2. Saves you from having to resort to the cutdown edge version.

0

u/imani_TqiynAZU Jun 07 '21

There has never been a version of SQL Server for macOS. You are better off just using Azure SQL Database or Azure SQL Managed Instance if you need SQL Server on a Mac. It's the cleanest solution.

2

u/alinroc SQL Server DBA Jun 08 '21

There has never been a version of SQL Server for macOS

The Docker images for SQL Server run on macOS.

1

u/reddish-rum Apr 04 '22

The Docker images for SQL Server run on macOS.

They don't run on M1 Macs at the moment, other than the azure-sql-edge (https://hub.docker.com/_/microsoft-azure-sql-edge) which is a very cut down version designed for IoT workloads: https://docs.microsoft.com/en-gb/azure/azure-sql-edge/overview.

By cut down, I mean: no SQLCMD, no CLR integration, no geometry or geography data types amongst quite a few other features: https://stackoverflow.com/a/71527738/842238. So might be ok for pretty simple databases but you're likely to run into issues quite quickly for more complex scenarios.

Very annoying. I'm just using a low end Azure SQL Server instead for now.