Connecting Linux and UNIX to Azure SQL Data Warehouse

If you have not already done so, provision a SQL Data Warehouse in the Azure cloud and add a firewall rule that allows access to your client's IP address. We did this by completing this easy to follow Microsoft tutorial.

  1. Download the SQL Server ODBC driver for your client platform.
  2. Install and license the SQL Server ODBC driver on your client machine.

    For installation instructions, refer to the ODBC driver documentation.

    Note You need the unixODBC Driver Manager installed on your machine. The Easysoft distribution includes a version of the unixODBC Driver Manager that the Easysoft SQL Server ODBC driver has been tested with. The Easysoft driver setup program gives you the option to install unixODBC.

  3. Create an ODBC data source in /etc/odbc.ini that connects to the SQL Azure data warehouse. For example:
    [SQLSERVER_SAMPLE_SSL]
    Driver=Easysoft ODBC-SQL Server SSL
    Description=Easysoft SQL Server ODBC driver
    Server=mynewserver-1234567.database.windows.net
    Port=1433
    Database=mySampleDataWarehouse
    User=cloudsa@mynewserver-1234567
    Password=P455w0rd
    Encrypt=Yes
    TrustServerCertificate=Yes
  4. Use isql to test the new data source. For example:
    cd /usr/local/easysoft/unixODBC/bin
    ./isql.sh -v SQLSERVER_SAMPLE_SSL

    At the prompt, enter help to display a list of tables. To exit, press Return in an empty prompt line.

    If you are unable to connect, refer to this article, this article, and the SQL Server ODBC driver Knowledge Base for assistance.