Automation Runbook - How to use with data gateway

cenko2 41 Reputation points
2020-06-23T21:10:23.023+00:00

I am new to Automation Runbook and getting the error: "A network-related or instance-specific error occurred while establishing a connection to SQL Server. There server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections." when I test a runbook that accesses a SQL Server database. I have been told that we have a data gateway that can access the database. How do I configure the runbook to use a data gateway to connect to a SQL Server database?

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

Accepted answer
  1. olufemia-MSFT 2,861 Reputation points
    2020-06-30T07:39:39.297+00:00

    Hello cenko2-3486,

    I assume your connection to the SQL server resource is handled within your script. If yes, replace with a connection reference to the Data gateway cluster.
    Here's an example of adding a data gateway via PowerShell. You may need to refactor based on your script's language.

    10965-datagateway.png

    Once your script is updated, re-import into your runbook and re-test. Also recommend checking out this reference on using runbook authentication to a local resource.

    Hope this helps.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful