none
Power Query to SQL Server connection error RRS feed

  • Question

  • Hi ,

    This is really weird , I have a SQL Server that's being hosted on our network , I am able to run queries on this server\database through my Excel Data Ribbon->From Other Sources->SQL Server Database without any issues ! Also when i try to access the same data from SQL Server Management Studio , I am able to connect without any issues and am able to run queries.  

    But when I use the PowerQuery and connect to the same server & database name i get the following error. Actually the error is not on just one SQL server database but on all SQL Server based databases.

    I also have PowerBI Desktop installed and I get the same issue on that as well

    Error Message: Details: "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)"

    Fixes tried so far: I have added the TCP port 1433 in my firewall Inbound rules, added the UDP port 1434 in my firewall Inbound rules, added the sqlservr.exe application to my firewall, added the sqlbrowser.exe application to my firewall,tried restarting the SQL server services in the Services app

    Nothing works, its ironical because I am able to make PowerQuery work with Quantum databases but the SQL server databases doesn't work / play well with Excel Power Query or Power BI

    Computer Config : Windows 10 Enterprise 64bit, Microsoft Office Professional Plus - Excel 2016, SQL Server 2012 , Power BI Desktop

    Friday, November 18, 2016 1:11 AM

Answers

  • Hi Curt, the problem is resolved now, one of my colleagues suggested me to install native clients for both SQL Server 2012 32 bit and the 64 bit express versions . Doing that and restarting the system made the PowerBi and PowerQuery to work with SQL server databases


    • Marked as answer by Nate_J Monday, November 21, 2016 7:43 PM
    • Edited by Nate_J Monday, November 21, 2016 7:44 PM
    Monday, November 21, 2016 7:38 PM

All replies

  • Can you try specifying the server name as "tcp:servername" instead of just "servername"? For some reason, SqlClient is picking named pipes instead of TCP/IP. We've had reports of this intermittently over the years, and don't know why it happens.

    Sunday, November 20, 2016 7:15 PM
  • Hi Curt, the problem is resolved now, one of my colleagues suggested me to install native clients for both SQL Server 2012 32 bit and the 64 bit express versions . Doing that and restarting the system made the PowerBi and PowerQuery to work with SQL server databases


    • Marked as answer by Nate_J Monday, November 21, 2016 7:43 PM
    • Edited by Nate_J Monday, November 21, 2016 7:44 PM
    Monday, November 21, 2016 7:38 PM
  • This solved my problem! 
    Monday, February 27, 2017 4:19 PM