How to install SQL Server for Mac [Every detail covered]
Did you hear that installing SQL Server on macOS is tricky? That’s not entirely true. While it’s a bit more challenging than on Windows, it should take you no more than 15 minutes anyway. In this post, I’ll explain how to install and set up Microsoft SQL Server on your Mac, step by step, in a way that even a kid could follow.
Step 1. Install and config Docker
Microsoft developed SQL Server for Windows, which means to run it on Mac, you’ll need an additional tool. Docker is just the software for the task as it provides an environment for your SQL Server to work in.
Here’s how to install Docker on your Mac.
- Download Docker from the official website and install it.
- Open Docker and agree to the terms. During the setup, you’ll need to install a helper tool, so your Mac will ask for your password to confirm the action.
- Sign up for the app. Here's what you'll see:
6. Return to localhost and click the arrow to expand the menu, and access the Databases folder (see the screenshot above).
7. Right-click on Databases and select Restore Database (Preview).
8. In the window that appears from the "Restore from" drop-down menu, select Backup file.
9. Click on three dots next to "Backup file path" and from there navigate to: var/opt/mssql/backup/AdventureWorks2022.bak
10. Confirm your choice and click Restore.
Now you are ready to test SQL database connection with a few test queries. To do that, just select your newly added sample database and click New Query.
Tools for managing databases
Now that you’ve completed your SQL Server setup, it’s time to think about managing your databases.
SQLPro Studio is one of the tools I can recommend. The app excels at all the database management basics that you need — create tables, make custom queries, use autocomplete, and more with this handy tool. SQLPro Studio is a native Mac app and supports multiple database types, including MySQL, PostgreSQL, Microsoft SQL Server, and others.
TablePlus is another app that can help you manage SQL databases. This GUI tool will come in handy for your MySQL, Postgre, SQLite, and other databases. Lightweight and fast, it's super easy to use and makes your databases work lightning fast. Navigate your connected databases, edit data rows or table structure, and more with TablePlus.
Base is an easy app with a spreadsheet-like interface that simplifies SQLite file management and eliminates the need to learn complex SQL commands. Its core features include easy SQLite database creation, instant and consistent data filtering, basic import and detailed export options, smart autocomplete, and more.
Try tools for managing SQL databases for free
As you see, installing SQL Server on your Mac is quick and easy, although it requires a virtualization tool, Docker. Since SSMS is not available for macOS, you’ll also need a replacement, which in our article was Azure Data Studio. The tool allows you to connect SQL Server engines to databases, even on macOS.
To manage and edit your databases, you can use specialized tools like SQLPro Studio or TablePlus. Both are available with your Setapp subscription, along with other tools for working with SQL databases, including SQLPro for SQLite and Base for SQLite.
Try these and more tools for daily productivity on Setapp. Start your 7-day free Setapp trial now!
FAQ
Can you run SSMS on Mac?
No, SQL Server Management Studio only runs on Windows. For macOS, Microsoft recommends using Azure Data Studio.
How do I access an SQL Server database on Mac?
In order to work with SQL databases on Mac, you need to use a virtualization tool like Docker, pull an SQL server image and run it, and then connect it to your Mac with a helper tool. You can do that with Azure Data Studio, or use other tools for the task. Run Azure Data Studio restore tool to add an existing database and check your SQL database connection with a few test queries.
How do I check SQL database status?
To check your SQL database status, you can use DATABASEPROPERTYEX function:
How do I test an SQL database connection?
Get a sample database from Microsoft (e.g., AdventureWorks2022.bak) and run a few queries.