How to Connect to MSSQL from macOS (for free)

Ascend
3 min readSep 1, 2023

--

Photo by Rubaitul Azad on Unsplash

We’re a mac-based-business and up until February 2023, had never had need to connect to an MSSQL database instance.

When we acquired Blindata this changed. It’s a Windows software and has an SQL dependency.

No problem, how hard can it be to find an application to access it from a mac computer? Turns out, more so than we’d thought.

The good news, is there’s a solution. And, it’s free.

Disclaimer ⚠️

There are paid alternatives that you can access and we found pretty much straight away. The best one we found on our journey was a Mac AppStore program called “SQLPro for MSSQL”.

At £8.99 per user per month, the cost ramps up pretty quickly.

There’s so many free options for MySQL, this was all getting a bit frustrating and we set about researching the market for options.

What about SQL Server Management Studio (SSMS)? 🤔

SSMS is exclusively for Windows. We’d come across it when we’d first acquired the business as it was a stock software all our customers had to interact with the database.

The essence of the application is a Win32 desktop program and therefore requires virtualisation software like Parallels or VMWare to run it on any macOS device.

Plus, we always found SSMS a pretty clunky software to use but something of a necessary evil. There’s much cleaner and intuitive tools available for MySQL by comparison.

Azure Data Studio has entered the chat 🛬

Azure Data Studio is a cross-platform database management tool — available for Windows, macOS, and Linux — that allows Windows & non-Windows systems alike to connect to an otherwise Windows-only ecosystem.

Given we’re a Mac business, we’ll focus from hereon in on mac usage.

To get started:

  1. Download Azure Data Studio
  2. Download the .zip file for macOS
  3. Once downloaded, unzip the file, drag the Azure Data Studio application into your Applications folder and double-click on Azure Data Studio to launch the application.

Setting up a new connection 🔌

  1. From the ‘Welcome’ screen. Click on the New Connection icon
  2. In the ‘Server’ field, enter the name or IP address or hostname of your MSSQL server
  3. Choose the appropriate ‘Authentication type’ from the dropdown. (We set-up an ‘SQL login’ to test how it worked)
  4. Name the database you want to connect to or leave it as the default to connect to all databases.
  5. You can save the connection details if you wish for future use by providing a name in the ‘Server Group’ field.
  6. Click on the Connect button.

Exploring databases 🗺️

Once connected, you’ll see your server listed in the SERVERS section on the left hand side.

Expanding the server reveals databases, tables, views and other objects.

From within Azure Data Studio, you can:

  • Write and execute SQL queries
  • Use the integrated terminal for command-line operations
  • Manage database operations like backup and restore (albeit this needs Enable Preview Features to be turned on)

General troubleshooting ⚒️

We’re not here to get into the weeds of debugging access issues but there’s some useful guidelines we have internally to reference if a database connection is squarking.

Connection timeout ⌛️

This often means there’s a network issue or the SQL Server isn’t accepting remote connections. Ensure there’s no firewall blocking the connection.

Authentication failed 😩

Double-check your authentication credentials and that your authentication type is set correctly or MFA is configured where required.

Can’t find server ⁉️

Make sure you’ve entered the correct server name or IP address, that your server is running and is reachable from your network.

Wrapping up 🎁

Azure Data Studio in our opinion provides us — as macOS users — with a powerful, intuitive interface for managing Microsoft SQL Server instances.

Whilst its feature set is ok and ample for what we need, researching the comparison between with SSMS, it a more simplistic, extensible tool for managing your SQL Server instances that lacks more advanced functionality that DBAs may benefit from.

From our research though, for querying large data sets, developing stored procedures and managing database’s for day-to-day operations, Azure Data Studio on macOS has ticked all the boxes.

--

--

Ascend
Ascend

Written by Ascend

We're Ascend - a digital transformation agency - and in just a few short years we have defied expectations and are emerging as a true leader in our sector.

No responses yet