Connect on-premises sql server with Azure functions giving error

Shivani Tyagi 20 Reputation points
2023-06-26T12:49:38.9466667+00:00

Hi,

I am trying to connect to the on-premises sql server from my Azure Function. I have setup the hybrid connection and my hybrid connection manager service is also up and running,

User's image

My connection string is as follows -

User's image

but I am getting this error-

User's image

Can anyone help me with this please?

Thanks,

Shivani Tyagi

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
SQL Server | Other
0 comments No comments
{count} votes

Answer accepted by question author
  1. Sina Salam 26,241 Reputation points Volunteer Moderator
    2023-06-26T16:40:55.1866667+00:00

    @Anonymous

    Welcome to Microsoft Q&A and thank you for posting your question here.

    To understand your question, you are asking for help to fix the error stated below.

    Error: ('01000', "[01000] [unixODBC][Driver Manager]Can't open lib 'ODBC Driver 17 for SQL Server' : file not found (0) (SQLDriverConnect)")

    The error code shows there is not a released v17 package for your OS RELEASE to establish the connection.

    Many have encountered this same error with different actions or tasks. The first I will advise you is to use the instructions in the link provided to install your ODBC. https://learn.microsoft.com/en-us/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server

    If you're not using Linux OS, use this https://learn.microsoft.com/en-us/sql/connect/odbc to find more information for different OS.

    The above links are Microsoft Documentations that has helped many though, there are many ways to solve this depend on the operating system you're using.

    Finally, ensure you check your OS release and compatible ODBC Driver suitable for the connection.

    I hope this is helpful! You can vote for this answer for the community usage, if you found it useful. PS: Do not hesitate to let me know if you have any other questions.

    Best Regards,

    Sina


1 additional answer

Sort by: Most helpful
  1. Saurabh Sharma 23,866 Reputation points Microsoft Employee Moderator
    2023-07-10T23:47:02.9366667+00:00

    @Anonymous

    Thanks for using Microsoft Q&A !!

    I believe you are trying to use Linux OS plan for your Azure Function and thus you are getting this error as Hybrid connections is only supported on Windows Plans. Please refer to Hybrid Connections document for more details.

    Thanks

    Saurabh


    Please do not forget to "Accept the answer" wherever the information provided helps you to help others in the community.

    0 comments No comments

Your answer

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