Is it possible to connect Azure Search Service to Local "OnPrem" SQL database

Johan Ögren 40 Reputation points
2024-11-29T13:26:52.57+00:00

I've been trying to find information on how to connect Azure Search Service to a local SQL database, but I'm still not finding what I need.

As the title says, I want to connect Azure Search directly to my local database so I can search the information in it without using an intermediate step. I understand that it's possible to create a .bacpac and import the database to Azure SQL, but that’s not what I'm looking for. Instead, I'd prefer a setup where Azure Search connects directly to my local database, allowing me to use authentication and access it as-is.

Could anyone point me in the right direction on how to achieve this? Specifically, I'd like to know how to start by adding my local SQL database as a data source and then proceed to create an index in Azure Search.

Thanks in advance for any guidance!

Azure AI Search
Azure AI Search
An Azure search service with built-in artificial intelligence capabilities that enrich information to help identify and explore relevant content at scale.
1,354 questions
SQL Server | Other
0 comments No comments
{count} votes

Accepted answer
  1. Laxman Reddy Revuri 5,400 Reputation points Microsoft External Staff Moderator
    2024-11-29T14:47:47.2066667+00:00

    Hi @Johan Ögren
    Thanks for the question and using MS Q&A platform.
    Azure Cognitive Search does not support direct connectivity to a local SQL database. However, this can be achieved through a workaround by synchronising your local data with a cloud-based storage solution.
    The steps are as follows:

    Synchronise Data Utilise tools like Azure Data Factory (ADF), SQL Server Integration Services (SSIS), or custom scripts to export data from your local SQL database to Azure Blob Storage or Azure SQL Database.

    Leverage Azure Data Factory Install the Self-Hosted Integration Runtime to securely connect Azure services to your local database. Create pipelines to automate periodic or incremental data transfers to the cloud.

    Set Up Azure Cognitive Search

    Configure your cloud-based data source (e.g., Blob Storage or Azure SQL Database) in Azure Cognitive Search.

    Create an indexer to index the data and ensure automatic updates.

    Automate Updates Schedule regular synchronisation tasks to keep your data up-to-date with minimal effort and latency.
    I hope this information is helpful.
    If the answer is helpful, please click "Accept Answer" and kindly upvote it.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

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.