All programmers need to learn SQL sooner or later: the SQL programming language is the backbone of most apps, businesses, and websites. Here's how to get started coding with SQL on the Mac. How can I connect to a remote SQL server using Mac OS X? I don't really need a GUI, but it would be nice to have for the color coding and resultset grid. I'd rather not have to use a VM. Is there a SQL client for Mac OS X that works with MS SQL Server? Never did I think that I'd be able to run SQL Server on my Mac. My, how times have changed. For the first time, SQL Server 2017 allows users to install the product on Linux. This opens the doors for working with fully-featured SQL Server database engines on MacOS through freely distributable Docker. Microsoft ODBC Driver 17 for SQL Server is a single dynamic-link library (DLL) containing run-time support for applications using native-code APIs to connect to Microsoft SQL Server 2008, SQL Server 2008 R2, SQL Server 2012, SQL Server 2014, SQL Server 2016, SQL Server 2017, Analytics Platform System, Azure SQL Database and Azure SQL Data Warehouse.
-->
This article explains how to install the Microsoft ODBC Driver for SQL Server on Linux and macOS, as well as the optional Command-Line Tools for SQL Server (
bcp and sqlcmd ) and the unixODBC Development Headers. Microsoft for mac free.
Microsoft ODBC Driver 17 for SQL Server
Important
If you installed the v17
msodbcsql package that was briefly available, you should remove it before installing the msodbcsql17 package. This will avoid conflicts. The msodbcsql17 package can be installed side by side with the msodbcsql v13 package.
DebianRedHat Enterprise ServerSUSE Linux Enterprise ServerUbuntu
Note
MacOSMicrosoft ODBC Driver 13.1 for SQL ServerDebian 8RedHat Enterprise Server 6RedHat Enterprise Server 7SUSE Linux Enterprise Server 11SUSE Linux Enterprise Server 12Ubuntu 15.10Ubuntu 16.04Ubuntu 16.10OS X 10.11 (El Capitan) and macOS 10.12 (Sierra)Microsoft ODBC Driver 13 for SQL ServerRedHat Enterprise Server 6RedHat Enterprise Server 7Ubuntu 15.10Ubuntu 16.04SUSE Linux Enterprise Server 12Offline installation
If you prefer/require the Microsoft ODBC Driver 13 to be installed on a computer with no internet connection, you will need to resolve package dependencies manually. The Microsoft ODBC Driver 13 has the following direct dependencies:
Each of these packages in turn has their own dependencies, which may or may not be present on the system. For a general solution to this issue, refer to your distribution's package manager documentation: Redhat, Ubuntu, and SUSE
It is also common to manually download all the dependent packages and place them together on the installation computer, then manually install each package in turn, finishing with the Microsoft ODBC Driver 13 package.
Redhat Linux Enterprise Server 7
Ubuntu 16.04
SUSE Linux Enterprise Server 12
Once you have completed the package installation, you can verify that the Microsoft ODBC Driver 13 can find all its dependencies by running ldd and inspecting its output for missing libraries:
Microsoft ODBC Driver 11 for SQL Server on Linux
Before you can use the driver, install the unixODBC driver manager. For more information, see Installing the Driver Manager.
Installation Steps
Important
These instructions refer to
msodbcsql-11.0.2270.0.tar.gz , which is installation file for Red Hat Linux. If you are installing the Preview for SUSE Linux, the file name is msodbcsql-11.0.2260.0.tar.gz .
To install the driver:
Installation puts the driver in
/opt/microsoft/msodbcsql/11.0.2270.0 . The driver and its support files must be in /opt/microsoft/msodbcsql/11.0.2270.0 .
To verify that the Microsoft ODBC driver on Linux was registered successfully, execute the following command:
odbcinst -q -d -n 'ODBC Driver 11 for SQL Server' .
Use Existing MSDN C++ ODBC Samples for the ODBC Driver on Linux shows a code sample that connects to SQL Server using the ODBC driver on Linux.
Uninstalling
You can uninstall the ODBC driver 11 on Linux by executing the following commands:
Troubleshooting Connection Problems
If you are unable to make a connection to SQL Server using the ODBC driver, use the following information to identify the problem.
The most common connection problem is to have two copies of the UnixODBC Driver Manager installed. Search /usr for libodbc*.so*. If you see more than one version of the file, you (possibly) have more than one driver manager installed. Your application might use the wrong version.
Enable the connection log by editing your
/etc/odbcinst.ini file to contain the following section with these items:
If you get another connection failure and do not see a log file, there (possibly) are two copies of the driver manager on your computer. Otherwise, the log output should be similar to the following:
If the ASCII character encoding is not UTF-8, for example:
There is more than one Driver Manager installed and your application is using the wrong one, or the Driver Manager was not built correctly.
For more information about resolving connection failures, see:
Driver Files
The ODBC Driver on Linux and MacOS consists of the following components:
Linux
![]() MacOS
Resource File Loading
The driver needs to load the resource file in order to function. This file is called
msodbcsqlr17.rll or msodbcsqlr13.rll depending on the driver version. The location of the .rll file is relative to the location of the driver itself (so or dylib ), as noted in the table above. As of version 17.1 the driver will also attempt to load the .rll from the default directory if loading from the relative path fails. The default resource file paths are:
Linux:
/opt/microsoft/msodbcsql17/share/resources/en_US/
Sql Server For Mac Os X
MacOS:
/usr/local/share/msodbcsql17/resources/en_US/ Origin for macaroon.
Sql Server For Mac OsxSee AlsoComments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |