run sql server in runbook

Ernesto Perez 1 Reputation point
2022-05-30T19:21:17.137+00:00

hello, I have a python script that runs in runbook, now I need to connect to sql server in azure with the same script, but it is giving me an error that it does not have the driver, how can I connect? or install odbc driver

Azure Automation
Azure Automation
An Azure service that is used to automate, configure, and install updates across hybrid environments.
1,289 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Swathi Dhanwada 18,806 Reputation points Microsoft Employee
    2022-05-31T08:22:55.547+00:00

    @Ernesto Perez Welcome to Microsoft Q & A Community Forum. Based on the information provided, I understand that utilizing the ODBC Driver 17 for SQL Server is not able to be used in a standard Azure Automation sandbox due to it not being installed by default in this environment and as a result a Hybrid Runbook Worker would need to be used to achieve this purpose. While not the optimal solution, the advantage of using a Hybrid Runbook Worker on an Azure VM is allowing you to setup the environment on that machine as the sandbox when running jobs will run on that machine rather than through Azure Automation sandboxes in the cloud. For more information on HRW, refer this document.

    I also would recommend you navigate here and share your feedback or suggestions directly with the responsible Azure feature team and clicking the vote button of your suggestion to raise visibility and priority on it.

    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.