Key Takeaways
  • Docker is the only way to run SQL Server on Mac. Since SQL Server doesn't natively support macOS, Docker provides the Linux environment it requires. The whole setup — Docker, SQL Server, and Azure Data Studio — takes about 15 minutes.
  • You need three things to get started. Docker Desktop (virtualization layer), a SQL Server Docker image pulled via Terminal, and Azure Data Studio as your management interface. Each step builds on the last.
  • Azure Data Studio replaces SSMS on Mac. SQL Server Management Studio doesn't run on macOS. Azure Data Studio is Microsoft's official alternative — it handles connections, queries, and database restores.
  • Test your installation before doing real work. Run a quick sqlcmd command in Terminal to confirm SQL Server is responding. Loading the AdventureWorks sample database is the most thorough way to verify everything works.
  • Want a more Mac-native experience? SQLPro Studio, TablePlus, and Base connect to SQL Server without the friction of Microsoft tools — all available on Setapp, free for 7 days.

To install SQL Server databases on your Mac, you'll first need to install Docker, then download and run SQL Server, and finally use a helper tool like Azure Data Studio.

Installing SQL Server on macOS has a reputation for being tricky, but in my experience, it's more straightforward than people think. With the right steps, you can have everything up and running in about 15 minutes.

Here's a summary of the key methods and tools for running SQL Server on Mac. Detailed instructions for each approach follow below:

MethodBest ForTime RequiredCost
Docker + SQL Server ExpressLocal development15 minutesFree
Docker + SQL Server DeveloperFull features testing15 minutesFree
Azure Data StudioDatabase management5 minutesFree
SQLPro StudioNative Mac experience2 minutesVia Setapp*, membership from $14.99 USD/mo + tax, free for 7 days
Virtual MachineWindows-only tools45+ minutesWindows license

*Setapp is a platform with 270+ apps for macOS, iOS, and web. Try it free for 7 days.

Step 1. Install and configure Docker

Microsoft developed SQL Server for Windows. To run it on Mac, you'll need Docker as a virtualization layer. Docker provides the Linux environment SQL Server needs to operate.

Here's how I install Docker on Mac:

  1. Download Docker Desktop from the official Docker website.
  2. Open the downloaded file and drag Docker to your Applications folder.
  3. Launch Docker and accept the terms of service.
  4. Sign in or create a Docker account when prompted.
  5. Wait for Docker Desktop to start completely.

Docker Desktop should now show the main dashboard. You'll see an empty list of containers since we haven't created any yet.

Step 2. Install SQL Server on Mac

Now you're ready to download and run SQL Server 2022 on your Mac. I'll show you the exact Terminal commands that work.

  1. Open Terminal (find it in Applications > Utilities).
  2. Pull the SQL Server Docker image by typing: docker pull mcr.microsoft.com/mssql/server:2022-latest
  3. Press Enter and wait about 5 minutes for the download to complete.

The command downloads Microsoft SQL Server 2022 from Microsoft's container registry. According to Microsoft's documentation, this process typically takes 3-7 minutes depending on your connection speed.

Next, run your SQL Server container with this command:

docker run --name SQLServer -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=YourStrong@Password123' -e 'MSSQL_PID=Express' -p 1433:1433 -d mcr.microsoft.com/mssql/server:2022-latest

Replace YourStrong@Password123 with your own secure password. The password must be at least 8 characters and include uppercase and lowercase letters, numbers, and symbols, per Microsoft's security requirements.

SQL Server is now running on your Mac. Check its status by clicking the Docker icon in your menu bar and selecting Dashboard.

Step 3. Install Azure Data Studio

Azure Data Studio is Microsoft's official SQL Server management tool for Mac. It replaces SQL Server Management Studio (SSMS), which only runs on Windows. 

  1. Download Azure Data Studio from Microsoft's download page.

  2. Open the downloaded file and drag Azure Data Studio to Applications.

  3. Launch Azure Data Studio and click Create a connection.

  4. Fill in these connection details:

    • Server: localhost
      Authentication type: SQL Login

    • User name: SA

    • Password: The password you created in Step 2

  5. Click Connect.

If you see an error about the certificate, click Enable Trust Server Certificate, then reconnect. Your database server dashboard should now appear.

Check that SQL Server is running correctly

I always verify my SQL Server installation works before starting any real work. The quickest test uses Docker's built-in SQL command tool.

Run this command in Terminal:

docker exec -it SQLServer /opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P 'YourStrong@Password123'

If you see the 1> prompt, SQL Server is working. Type SELECT @@VERSION and press Enter twice to see your SQL Server version details.

For a more thorough test, I recommend loading Microsoft's sample database:

  1. Download AdventureWorks2022.bak from Microsoft.
  2. Create a backup directory in your container: docker exec -it SQLServer mkdir /var/opt/mssql/backup
  3. Copy the database file: docker cp ~/Downloads/AdventureWorks2022.bak SQLServer:/var/opt/mssql/backup
  4. In Azure Data Studio, right-click Databases and choose Restore Database.
  5. Choose Backup file and browse to /var/opt/mssql/backup/AdventureWorks2022.bak.
  6. Click Restore.

You can now run test queries against real data to verify everything works correctly.

Database management tools to improve your experience on Mac

While Azure Data Studio handles basic tasks, specialized tools can significantly improve your workflow. If you want a broader comparison, here's a full roundup of the best database software for Mac. I’ve tested three of them, and here’s what I think:

  • My go-to for database management on Mac is SQLPro Studio. It connects natively to SQL Server, MySQL, PostgreSQL, and more without requiring Java. The app handles everything from creating tables to running complex queries with autocomplete support.
The interface of SQLPro Studio, a database management app available on Setapp
  • TablePlus offers another excellent option if you prefer a cleaner interface. It renders queries quickly and supports multiple database types in a single window. The app includes syntax highlighting and safe mode for risk-free experimentation.
  • If you primarily use SQLite databases, I’d suggest trying Base. Its spreadsheet-like interface lets you manage databases without having to memorize SQL syntax. You can create databases, filter data instantly, and export to various formats.
The interface of Base, a database management app available on Setapp

After installing SQL Server: Pick your database tool 

Installing SQL Server on your Mac is quick and straightforward, though it does require Docker as a virtualization tool. Since SSMS isn't available for macOS, Azure Data Studio serves as your primary management interface.

If you want a more polished, Mac-native experience, you can try other database management tools such as SQLPro StudioTablePlus, and Base — each one connects to SQL Server without the friction of a Microsoft tool. All three are available on Setapp, which you can try free for 7 days. Start your 7-day free Setapp trial now.

FAQ

Can you run SSMS on Mac?

No, SQL Server Management Studio only runs on Windows. Microsoft recommends Azure Data Studio for Mac users.  You can also run SSMS through a Windows virtual machine using Parallels Desktop or VMware Fusion. Remote Desktop to a Windows machine offers another workaround.

How do I access an SQL Server database on Mac?

To access SQL Server databases on Mac, you'll need Docker as a virtualization tool. Pull an SQL Server image, run it, then connect using a helper tool like Azure Data Studio. Use these connection settings: Server: localhost, Authentication: SQL Login, Username: SA, Password: your chosen password.

How do I check SQL database status?

Run this SQL query in Azure Data Studio: SELECT name, state_desc FROM sys.databases. The state_desc column shows ONLINE for active databases. You can also check Docker Desktop's container status or run docker ps in Terminal.

How do I test an SQL database connection?

Test your connection with this Terminal command: docker exec -it SQLServer /opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P 'YourPassword'. If successful, you'll see the sqlcmd prompt. Alternatively, try connecting through Azure Data Studio.

Is SQL Server free on Mac?

Yes, SQL Server Express and Developer editions are free when running in Docker on Mac. Express handles databases up to 10GB. The Developer edition includes all Enterprise features, but only for development use. Production use requires a paid Microsoft license.

Do I need Docker to run SQL Server on Mac?

Yes, Docker is required because SQL Server doesn't run natively on macOS. Docker provides the Linux environment SQL Server needs. The only alternatives are virtual machines running Windows or connecting to a remote SQL Server instance.

410+ apps for all your daily tasks.

Sign up to Setapp and try them for free.

Security-tested