In the ODBC Data Source Administrator dialog box, select the data source from the Data Sources list and click Configure. The Oracle ODBC Driver Configuration dialog box is displayed. In the Oracle ODBC Driver Configuration Dialog Box, modify the option values as necessary and click OK. Dec 12, 2018 Install the psqlodbc PostgreSQL ODBC driver: This is the official ODBC driver manager and driver from the PostgreSQL. You can configure ODBC using only odbc.ini, which contains the ODBC DSN details. You can optionally using odbcinst.ini as well but it is not needed. Configure ODBC using the odbc. The Mac OS X environment has a GUI interface for creatingand configuring an IBM® Informix®ODBC data source name (DSN). This utility is the ODBC Administrator. To create and configure an InformixDSNon Mac OS X: Open the ODBC Administrator by choosing Applications Utilities ODBC Administrator. Click the System DSNtab.
-->This article explains how to install the Microsoft ODBC Driver for SQL Server on macOS. It also includes instructions for the optional command-line tools for SQL Server (
bcp
and sqlcmd
) and the unixODBC development headers.This article provides commands for installing the ODBC driver from the bash shell. If you want to download the packages directly, see Download ODBC Driver for SQL Server.
Microsoft ODBC 17
To install Microsoft ODBC driver 17 for SQL Server on macOS, run the following commands:
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.Previous versions
The following sections provide instructions for installing previous versions of the Microsoft ODBC driver on macOS.
ODBC 13.1
Odbc Dsn Oracle
Use the following commands to install the Microsoft ODBC driver 13.1 for SQL Server on OS X 10.11 (El Capitan) and macOS 10.12 (Sierra):
Driver files
The ODBC driver on macOS consists of the following components:
Odbc Driver Dsn Setup
Component | Description |
---|---|
libmsodbcsql.17.dylib or libmsodbcsql.13.dylib | The dynamic library (dylib ) file that contains all of the driver's functionality. This file is installed in /usr/local/lib/ . |
msodbcsqlr17.rll or msodbcsqlr13.rll | The accompanying resource file for the driver library. This file is installed in [driver .dylib directory]../share/msodbcsql17/resources/en_US/ for Driver 17 and in [driver .dylib directory]../share/msodbcsql/resources/en_US/ for Driver 13. |
msodbcsql.h | The header file that contains all of the new definitions needed to use the driver. Note: You cannot reference msodbcsql.h and odbcss.h in the same program. msodbcsql.h is installed in /usr/local/include/msodbcsql17/ for Driver 17 and in /usr/local/include/msodbcsql/ for Driver 13. |
LICENSE.txt | The text file that contains the terms of the End-User License Agreement. This file is placed in /usr/local/share/doc/msodbcsql17/ for Driver 17 and in /usr/local/share/doc/msodbcsql/ for Driver 13. |
RELEASE_NOTES | The text file that contains release notes. This file is placed in /usr/local/share/doc/msodbcsql17/ for Driver 17 and in /usr/local/share/doc/msodbcsql/ for Driver 13. |
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 path on macOS is /usr/local/share/msodbcsql17/resources/en_US/
Troubleshooting
If you are unable to make a connection to SQL Server using the ODBC driver, see the known issues article on troubleshooting connection problems.
Next steps
After installing the driver, you can try the C++ ODBC example application. For more information about developing ODBC applications, see Developing Applications.
For more information, see the ODBC driver release notes and system requirements.
To configure a DSN on macOS, you can either use the command-line utility (myodbc-installer), edit the
odbc.ini
file within the Library/ODBC
directory of the user, or use the ODBC Administrator GUI. The ODBC Administrator is included in OS X v10.5 and earlier; users of later versions of OS X and macOS need to download and install it manually.
To create a DSN using the myodbc-installer utility, you only need to specify the DSN type and the DSN connection string. For example:
To use ODBC Administrator:
- For correct operation of ODBC Administrator, ensure that the
/Library/ODBC/odbc.ini
file used to set up ODBC connectivity and DSNs are writable by theadmin
group. If this file is not writable by this group, then the ODBC Administrator may fail, or may appear to work but not generate the correct entry. - There are known issues with the macOS ODBC Administrator and Connector/ODBC that may prevent you from creating a DSN using this method. In that case, use the command line or edit the
odbc.ini
file directly. Existing DSNs or those that you created using the myodbc-installer tool can still be checked and edited using ODBC Administrator.
- Open the ODBC Administrator from the
Utilities
folder in theApplications
folder.Figure 5.6ODBC Administrator
Dialog - From the
ODBC Administrator
dialog, choose either the User DSN or System DSN tab and click . - Select the Connector/ODBC driver and click .
- You will be presented with the
Data Source Name
(DSN) dialog. Enter theData Source Name
and an optionalDescription
for the DSN.Figure 5.7ODBC Administrator Data Source Name
Dialog - Click to add a new keyword/value pair to the panel. Configure at least four pairs to specify the
server
,username
,password
anddatabase
connection parameters. See Section 5.2, “Connector/ODBC Connection Parameters”. - Click to add the DSN to the list of configured data source names.
A completed DSN configuration may look like this:
Oracle Odbc Drivers For Windows
Figure 5.8
ODBC Administrator Sample DSN
Dialog You can configure other ODBC options in your DSN by adding further keyword/value pairs and setting the corresponding values. See Section 5.2, “Connector/ODBC Connection Parameters”.