Connecting to MS SQL Server from Mac machines
Prior to connecting to an MS SQL Server instance from a Mac machine, there are some configuration settings that need to enabled on the SQL Server database.
1. The SQL Server database should be configured to accept TCP/IP connections. Many SQL Server installations are set up to only allow shared memory or named pipe access. You can setup the TCP/IP option using a tool like the SQL Server Configuration manager. Under Network Configuration there is an option for Protocols. One of those protocols is TCP/IP . Make sure to enable TCP/IP. Note the port on which the TCP/IP protocol is listening. This port will be required for the connection. The default port for SQL Server is 1433.
2. If the user connecting to the database does not have a valid user id and password for the windows domain used by SQL Server, mixed mode authentation would need to be enabled on the SQL Server instance, and an administrator would need to create a SQL Server user id and password for the user connecting to the instance using SQL Server Authentication.
The easiest way to connect to MS SQL Server from Mac is with a JDBC (Java Database Connectivity) driver. There are two options for JDBC driver. Once is the open source jTDS driver. The other is the JDBC driver from Microsoft.
If using the jTDS driver, the connection can be made using either SQL Server Authentication or Windows Authentication. If using Windows authentication, the domain is also needed in addition to the user name and password. Note that the jTDS driver may have problems connecting to newer versions of SQL Server that require SSL encryption. If the jTDS driver is not able to connect, the Microsoft SQL Server JDBC driver can be used instead.
If using the Microsoft SQL Server JDBC driver on the Mac, only SQL Server Authentication is supported, so the user would need to be set up as a SQL Server Authentication user on the database.
If you are looking for a client program to query, edit, browse, and manage your SQL Server instance, check out RazorSQL. Free trials can be downloaded from here: https://razorsql.com/download.html. RazorSQL supports both the jTDS driver and the MS SQL Server JDBC driver for connections to SQL Server.
If you would like to proceed with writing your own programs to access SQL Server, check out
the documentation for the jTDS driver to get started:
SQL Server jTDS JDBC Driver