azureconnectionazure-sql-databaseazure-search-.net-sdk

Azure Search failed to connect to Azure SQL Database data source


I am trying to import data from a SQL Database into Azure Search, but when attempting to connect to the data source, I receive the following error message: "Failed to fetch". I have confirmed that I can locate the data source in Azure Search and have provided the correct connection information. What could be causing this error, and how can I resolve it? Picture

How can I connect the Azure Search to Azure SQL Database? Thanks


Solution

  • I also tried to reproduce the similar issue and found the similar error.

    enter image description here

    The reason of the result might be your SQL server is under firewall and because of it the access is getting restricted and Azure Search failing to connect to database data source.

    To resolve this, set the Public network access to Selected Netwoks in the networking of respective server.

    enter image description here

    And check the Allow Azure services and resources to access this server so that azure services can access this server easily.

    enter image description here

    If still issue persist it might be internal issue, then it's better to raise a Support ticket for your issue.

    Reference: Create Index for Full Text Search using Azure Cognitive Service and Azure SQL Database