Ms Sql Odbc Driver For Mac



  1. Ms Sql Odbc Driver For Mac Download
  2. Odbc Driver 11 For Sql Server
  3. Ms Sql Odbc Driver For Mac Os
  4. Microsoft Odbc Driver 17 For Sql
[This article was first published on Super Nerdy Cool » R, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here) Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
  1. The ODBC drivers for Linux and macOS support AlwaysOn Availability Groups. For more information about AlwaysOn Availability Groups, see: Availability Group Listeners, Client Connectivity, and Application Failover (SQL Server) Creation and Configuration of Availability Groups (SQL Server).
  2. Connector/ODBC is a standardized database driver for Windows, Linux, Mac OS X, and Unix platforms. Online Documentation: MySQL Connector/ODBC Installation.

Native GUI client access to MS-SQL and MySQL

Microsoft ODBC Driver for SQL Server is a single dynamic-link library (DLL) containing run-time support for applications using native-code APIs to connect to SQL Server. Use Microsoft ODBC Driver 17 for SQL Server to create new applications or enhance existing applications that need to take advantage of newer SQL Server features. 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. Ed: phpMyAdmin is for MySQL, but the asker needs something for Microsoft SQL Server. Most solutions that I found involve using an ODBC Driver and then whatever client application you use. For example, Gorilla SQL claims to be able to do that, even though the project seems abandoned. Most good solutions are either using Remote Desktop or VMware.

We can useOracle SQL Developer with the jTDS driver to access Microsoft SQL Server. Note: jTDS version 1.3.0 did not work for me; I had to use version 1.2.6. Detailed instructions can be found here.

We can use MySQL Workbench to access MySQL server. Setup is intuitively obvious.

Overview of ODBC on Mac OS X

Mac OS X has iODBC installed as it’s default ODBC manager. Most other Linux/UNIX system uses unixODBC to manage the ODBC drivers. This is the main reason why there’s so much confusion on getting ODBC to work on Mac OS X.

ODBC is kind of like an API for any software to access any DBMS easily, regardless of what DBMS it is and what OS it’s running on. Different software (e.g., R or Python) can utilize ODBC to access different DBMS through the following logic: Software -> ODBC Manager -> ODBC Driver for the DBMS -> DBMS Server (Software: R, Python, etc.; DBMS: MySQL, MS-SQL, etc.).

It doesn’t matter whether you use iODBC or unixODBC. Whichever one you use, just make sure the DBMS Driver and software you are using are configured/compiled to use with the same ODBC manager (usually set through the configure flags). For example, the R package RODBC and Python package pyodbc are compiled by default to use iODBC on Mac OS X. The DBMS drivers used must be compiled for use with iODBC. For iODBC, one could add data source names (DSN’s) at ~/Library/ODBC/odbc.ini. For unixODBC, one could add DSN’s at ~/.odbc.ini.

My current setup utilizes iODBC. I will outline the instructions for setting up MySQL and freeTDS (MS-SQL) drivers for use with RODBC and pyodbc through iODBC.

MySQL and FreeTDS with iODBC on Mac OS X

Install the MySQL Connector/ODBC driver. Driver should be at /usr/local/lib/libmyodbc5.so or /usr/local/lib/libmyodbc5w.so. Note: I’m unable to compile the driver from source on Mac OS X.

Ms Sql Odbc Driver For Mac Download

FreeTDS is an open source ODBC driver to access MS SQL Server. Install via Home Brew:

Driver should be at /usr/local/lib/libtdsodbc.so (symbolic linked).

Create ~/Library/ODBC/odbc.ini:

Install pyodbc via sudo pip install pyodbc. Test connections in python:

Install R using the installer. Install RODBC in the R interpreter via install.packages('RODBC'). Test connections in R:

More on unixODBC on Mac OS X

Odbc Driver 11 For Sql Server

If one wants to use unixODBC on Mac OS X instead, note the following:

  • First install unixODBC via Homebrew with brew install unixodbc.
  • Compile R from source to have it work with unixODBC (R binaries from the installer uses iODBC by default).
  • Can choose --with-odbc-manager=odbc when compiling RODBC.
  • When compiling freeTDS, include the argument with-unixodbc (pass to Homebrew or when compiling manually).
  • I’m unable to compile the MySQL Connector driver on Mac OS X from source (Homebrew or manually). Thus, it won’t work with unixODBC. I believe I tried unixODBC and MySQL Connector from macports, and those work.
  • pyodbc only works with iODBC on Mac OS X (inspect setup file). Currently I can’t get pyodbc to work with unixODBC on Mac OS X.

More differences between unixODBC and iODBC

unixODBC comes with the isql command to access different DBMS from the command line interpreter. iODBC comes with the iodbctest and iodbctestw commands. The command isql works for me on Mac OS X when I set freeTDS up to work with unixODBC (e.g., accessing MS SQL Server). I couldn’t access MySQL server because the MySQL Connector driver was compiled for use with iODBC.

If I use iODBC, I get the following for trying to access a MySQL server:

When I try to access SQL Server, I get

Don’t know why that is so. I guess it’s not too important to use an interactive interpreter. What matter is that the driver works with R and Python. Perhaps I should consider sqsh or do more searching.

To leave a comment for the author, please follow the link and comment on their blog: Super Nerdy Cool » R.
R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job. Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

ODBC driver managers use configuration files to define and configure ODBC datasources and drivers. To configure an ODBC connection for Mac OS X, note the followingprocedure:

Step 1: Driver Installer Updates Sample Configuration Files

Before you connect to Drill through an ODBC client tool on Mac OS X, the driver installer copies the following configuration files in /Library/mapr/drill/Setup to your home directory unless the files already exist in your home directory:

  • mapr.drillodbc.ini
  • odbc.ini
  • odbcinst.ini

In your home directory, rename the files as hidden files. Use sudo if necessary:

  • .mapr.drillodbc.ini
  • .odbc.ini
  • .odbcinst.ini

The installer for Mac OS X creates a sample user DSN in odbc.ini in either of the following locations:

  • ~/Library/ODBC/odbc.ini
  • ~/.odbc.ini

Depending on the driver manager you use, the user DSN in one of these files will be effective.

Note

The System and User DSN use different ini files in different locations on OS X.

Step 2: Set Environment Variables

The driver installer installs the .mapr.drillodbc.ini file to your home directory and adds an entry to the $HOME/.odbc.ini file.

If you installed the iODBC driver manager using the DMG, the dynamic linker (DYLD) libraries are installed in /usr/local/iODBC/lib. The launchd.conf file contains contents such as the following:

Restart the Mac OS X or run launchctl load /etc/launchd.conf.

Step 3: Define the ODBC Data Sources in .odbc.ini

Define the ODBC data sources in the ~/.odbc.ini configuration file for your environment.

Ms sql odbc driver for mac excel 2011

You set the following properties for using Drill in embedded mode:

You set the following properties for using Drill in distributed mode:

Authentication Properties

If the Drillbit requires authentication, uncomment the AuthenticationType, add an AuthenticationType, and configure properties. If the Drillbit does not require authentication (or to configure no password protection), you can use the No Authentication option. You do not need to configure additional settings.

  • Kerberos
    • See the MIT Kerberos documentation for installing and configuring a Kerberos environment, which is beyond the scope of the information provided here.
    • To specify the Kerberos mechanism:
      • Set the AuthenticationType to Kerberos.
      • Set the KrbServiceHost property to the FQDN of the Drill server host.
      • Set the KrbServiceName property to the Kerberos service principal name of the Drill server.
  • Plain (or Basic Authentication)
    • Configure the UID to an appropriate name for accessing the Drill server.
    • Set the PWD property to the password corresponding to the UID.

To configure no password protection, select No Authentication.

Direct and ZooKeeper Quorum Properties

To use Drill in distributed mode, set ConnectionType to Zookeeper, get the ZKQuorum and ZKClusterID values from the drill-override.conf file, and define the ZKQuorum and ZKClusterID properties. Format ZKQuorum as a comma separated list of ZooKeeper nodes in the following format:
<host name/ip address> : <port number>, <host name/ip address> : <port number>, . . .

For example:

  • ZKQuorum=centos23:5181,centos28:5181,centos29:5181
  • ZKClusterID=docs41cluster-drillbits

To use Drill in local mode, do not define the ZKQuorum and ZKClusterID properties. Start Drill using the drill-localhost command, set ConnectionType to Direct, and define HOST and PORT properties. For example:

  • HOST=<IP address of drillbit>:5181
  • PORT=31010

Driver Configuration Options describes configuration options available for controlling thebehavior of DSNs using the Drill ODBC Driver.

Sample Configuration File

The following sample shows a possible configuration for using Drill in embedded mode.

Note

Ms Sql Odbc Driver For Mac Os

The password should be provided in the connection string or ODBC application at connection time, not in the INI file.

Step 4: Configure the Drill ODBC Driver

Microsoft Odbc Driver 17 For Sql

Configure the Drill ODBC Driver for your environment by modifying the .mapr.drillodbc.ini configurationfile. This configures the driver to work with your ODBC driver manager. The following sample shows a possible configuration, which you can use as is if you installed the default iODBC driver manager.

Example

Configuring .mapr.drillodbc.ini

To configure the Drill ODBC Driver in the .mapr.drillodbc.ini configuration file, complete the following steps:

  1. Open the .mapr.drillodbc.ini configuration file in a text editor.

  2. Edit the DisableAsync setting if you want to enable a synchronous ODBC connection for performance reasons. Change the default 0 to 1 to disable the asynchronous and enable the synchronous connection. A change in state occurs during driver initialization and is propagated to all driver DSNs.

  1. Save the .mapr.drillodbc.ini configuration file.

Next Step

Refer to Testing the ODBC Connection.

← Configuring ODBC on LinuxConfiguring ODBC on Windows →




Comments are closed.