Missing ODBC drivers in Azure ML Compute Instances

Anonymous
2023-05-10T18:51:24.3933333+00:00

Trying to connect via ODBC to a synapse dedicated SQL pool using python SQL Alchemy.

The connection string for the dedicated SQL pool specifies 'ODBC Driver 13 for SQL Server', which produces the errorr 'Can't open lib 'ODBC Driver 13 for SQL Server' : file not found'.

If I use 'ODBC Driver 17 for SQL Server', the compute can find the driver but there is a login timeout error. This might be from the different driver.

How do I install the 'ODBC Driver 13 for SQL Server' onto the remote compute instance?

Azure Machine Learning
Azure Machine Learning
An Azure machine learning service for building and deploying models.
3,346 questions
Azure Synapse Analytics
Azure Synapse Analytics
An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.
5,382 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Bhargava-MSFT 31,261 Reputation points Microsoft Employee Moderator
    2023-05-11T21:17:57.7333333+00:00

    Hello Dance, Cody R. (ALT),

    Welcome to the MS Q&A platform.

    To install the 'ODBC Driver 13 for SQL Server' on your remote compute instance, you can download the exe from this URL(for Windows)

    For Linux:

    %sh
    curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
    curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list > /etc/apt/sources.list.d/mssql-release.list
    sudo apt-get update
    sudo ACCEPT_EULA=Y apt-get -q -y install msodbcsql13
    sudo apt-get install unixodbc-dev
    

    Once you install the ODBC driver 13 for SQL, you can use it in your SQLAlchemy connection string.

    I hope this helps. Please let me know if you have any further questions.

    2 people found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.