Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Connectors
Unanswered

Cannot connect to onprem SQL server 2016

(0) ShareShare
ReportReport
Posted on by 6

Hello,

I am not able to connect to my SQL server on prem. I am using enterprise gateway which seems to be fine (I have no issues with the gateway which i also use to refresh and query data through Power BI and it works without any issues).

My TCP port on is showing to be 1433.

More details on the error message below. Any ideas how to fix this will be highly appreciated.

 

Thank you

 

 

OUTPUTS

 

• Headers

{ "Pragma": "no-cache", "x-ms-request-id": "9b66acb3-d2f6-4a49-af7c-721ce2467f30", "Cache-Control": "no-cache", "Date": "Wed, 11 Jan 2017 14:48:31 GMT", "Server": "Microsoft-IIS/8.0,Microsoft-HTTPAPI/2.0", "X-AspNet-Version": "4.0.30319", "X-Powered-By": "ASP.NET", "Content-Length": "769", "Content-Type": "application/json; charset=utf-8", "Expires": "-1" }


• Body

{ "status": 400, "message": "A network-related or instance-specific error occurred while establishing a connection to SQL Server. The 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. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)\r\n inner exception: Microsoft SQL: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The 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. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)", "source": "127.0.0.1" }

Categories:
  • v-monli-msft Profile Picture
    on at
    Re: Cannot connect to onprem SQL server 2016

    Hi Nick,

     

    Make sure that you have gone throught his article carefully:

    https://powerapps.microsoft.com/en-us/blog/connect-to-your-on-premises-data-sources-using-on-premises-data-gateway-from-powerapps/

     

    Regards,

    Mona

  • nickchobotar Profile Picture
    6 on at
    Re: Cannot connect to onprem SQL server 2016

    Thank you for your comment, AVO. We did go over that and based upon the error we are getting back I think the problem is not with the gateway. Gateway works fine with Power BI. All our connections we established from Power BI to our onprem SQL server work without any glitches. Since, the gateway is the same for Power BI and Flow the problem must be with something else….

    Anyone else out there that has problems connecting to onprem SQL server?

  • AVO Profile Picture
    2 on at
    Re: Cannot connect to onprem SQL server 2016

    Hi,

     

    I'm new so perhaps this is a oversimplistic suggestion - but have you checked that every item on the Microsoft Flow Prerequisites for Gateways is in place? 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1

Featured topics