Connect to on-prem sql server using Azure Relay

Santhi Dhanuskodi 325 Reputation points
2024-04-01T07:44:00.09+00:00

Hi,

I would like to connect to a on-prem sql server and execute T-SQL commands to listen and receive SQL broker messages from Azure cloud hosted .net application.

How can i connect to on-prem sql server and execute these sql commands and receive the responses? Looking for solutions and sample code.

I have connection string specified in my .net app...how should I change my connection string or any other code?

My current code in.net (without any relay/hybrid connection)is in below picture. Should I modify this code if I use hybrid connection/Azure Relay? or it is only a configuration required at azure rely and hybrid connections?

User's image

Azure Fluid Relay
Azure Fluid Relay
An Azure service used to add real-time collaborative experiences to apps with Fluid Framework.
5 questions
SQL Server SQL Server Transact-SQL
Developer technologies .NET Other
Developer technologies Transact-SQL
{count} votes

2 answers

Sort by: Most helpful
  1. Bruce (SqlWork.com) 77,686 Reputation points Volunteer Moderator
    2024-04-01T15:41:21.96+00:00

    only the connection string is modified to the relay endpoint.


  2. Bruce (SqlWork.com) 77,686 Reputation points Volunteer Moderator
    2024-04-09T19:54:02.98+00:00

    for an azure app to connect to you on-prem sqlserver, you need a network connection between them. you have several options:

    note: none these solutions magically turn your sqlserver in a http api server.


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.