Forum Discussion

prabavathym's avatar
prabavathym
Helper II
9 months ago
Solved

Power BI SQL Connection Timeout – Pre-login Handshake Failed

Hi everyone,

I’m running into a persistent connection issue when trying to connect Power BI Desktop to a SQL Server database.

Error Details:
Microsoft SQL: Connection Timeout Expired. The timeout period elapsed while attempting to consume the pre-login handshake acknowledgement. This could be because the pre-login handshake failed or the server was unable to respond back in time. The duration spent while attempting to connect to this server was - [Pre-Login] initialization=29159; handshake=26353;

What I’ve Observed

  • The same SQL Server instance connects successfully using SQL Server Management Studio (SSMS) and Tableau with the same credentials and server details.

  • The issue occurs only in Power BI Desktop.

  • It seems to fail during the pre-login handshake phase, possibly related to timeout or TLS negotiation.

What I’ve Tried

  • Verified SQL Server instance is running and accessible.

  • Confirmed correct server name, port, and authentication settings in Power BI.

  • Checked that firewall and port 1433 are open.

  • Network connection is stable (no VPN drops).

  • Increased the connection timeout value — no improvement.

  • Restarted Power BI Desktop and the SQL Server service.

Environment Details

  • Power BI Desktop version: 2.142.928.0 (64-bit, April 2025)

  • ODBC Driver: ODBC Driver 17 for SQL Server (2017.1710.06.01)

  • Question

    Has anyone else experienced this pre-login handshake timeout issue with Power BI, even though SSMS and Tableau can connect to the same database successfully?

    Any suggestions on resolving this — whether it’s related to the Power BI SQL connector, driver version, TLS settings, or network timeout configuration — would be greatly appreciated.

  • This Power BI SQL Server connection timeout during the pre-login handshake is almost always related to mismatches in TLS/SSL settings, driver compatibility, firewall port handling, or certificate issues. Here are concise steps to troubleshoot and resolve based on recent user reports and official solutions:​


    Step-by-Step Solution

    1. Verify SQL Server Access

      • Use ping <SQLServerName> and telnet <SQLServerName> 1433 on your machine to confirm connectivity.​

    2. Check Driver and Power BI Version

      • Make sure Power BI Desktop and your SQL ODBC driver (try ODBC Driver 18 for SQL Server if possible) are updated to the latest versions.​

    3. Review TLS/SSL Settings

      • If SQL Server is set to “Force Encryption” and using a self-signed certificate, Power BI may fail to connect if the certificate cannot be verified.​

      • Try disabling “Force Encryption” on SQL Server as a test (consult with your DBA).

    4. Disable Encryption Temporarily

      • In Power BI, append ;Encrypt=False to the server connection string.​

      • Example: Server=yourserver;Encrypt=False

      • If this works, SSL issues are likely.

    5. Use Fully Qualified Domain Name (FQDN)

      • Ensure you are using the FQDN matching the SQL Server certificate’s CN or SAN fields in your Power BI connection details.​

    6. Increase Timeout in Power BI

      • Go to Options > Data Load > Timeouts and set timeout to 300 seconds.​

    7. Check Windows Firewall and SQL Ports

      • Verify TCP port 1433 and UDP port 1434 are open and correctly routed on both local and server firewalls.​

    8. Check Network Stability/Latency

      • Test on a wired network, not just Wi-Fi, to rule out intermittent network drops.​

    9. Restart SQL Server and Power BI Desktop

      • Sometimes connection resets resolve handshake issues.

6 Replies

  • This Power BI SQL Server connection timeout during the pre-login handshake is almost always related to mismatches in TLS/SSL settings, driver compatibility, firewall port handling, or certificate issues. Here are concise steps to troubleshoot and resolve based on recent user reports and official solutions:​


    Step-by-Step Solution

    1. Verify SQL Server Access

      • Use ping <SQLServerName> and telnet <SQLServerName> 1433 on your machine to confirm connectivity.​

    2. Check Driver and Power BI Version

      • Make sure Power BI Desktop and your SQL ODBC driver (try ODBC Driver 18 for SQL Server if possible) are updated to the latest versions.​

    3. Review TLS/SSL Settings

      • If SQL Server is set to “Force Encryption” and using a self-signed certificate, Power BI may fail to connect if the certificate cannot be verified.​

      • Try disabling “Force Encryption” on SQL Server as a test (consult with your DBA).

    4. Disable Encryption Temporarily

      • In Power BI, append ;Encrypt=False to the server connection string.​

      • Example: Server=yourserver;Encrypt=False

      • If this works, SSL issues are likely.

    5. Use Fully Qualified Domain Name (FQDN)

      • Ensure you are using the FQDN matching the SQL Server certificate’s CN or SAN fields in your Power BI connection details.​

    6. Increase Timeout in Power BI

      • Go to Options > Data Load > Timeouts and set timeout to 300 seconds.​

    7. Check Windows Firewall and SQL Ports

      • Verify TCP port 1433 and UDP port 1434 are open and correctly routed on both local and server firewalls.​

    8. Check Network Stability/Latency

      • Test on a wired network, not just Wi-Fi, to rule out intermittent network drops.​

    9. Restart SQL Server and Power BI Desktop

      • Sometimes connection resets resolve handshake issues.

  • Hi prabavathym ,

    What authentication method are you using? Is it Microsoft Authentication or SQL Authentication? Can you try switching to a different authentication method and see if things are different? Also, you could probably try connecting to a different SQL Server instance (or create a local instance) and check if the issue exists for all SQL Server instances or is it for just this server instance?

    Hope it helps!

    • prabavathym's avatar
      prabavathym
      Helper II

      Thanks for the quick response!

      I’m currently using SQL Authentication to connect.

  • Really helpful steps — I’ll try updating the driver and checking the TLS/encryption settings. Will share how it goes.

    • V-yubandi-msft's avatar
      V-yubandi-msft
      Community Support

      Hi prabavathym ,

      May I know if there are any updates regarding the driver update and TLS/encryption settings? Please let us know how it went, and if you need any further assistance, we’re here to help.

       

      Thank you alish_b Shubham_rai955 for your prompt response.

       

      Regards,
      Yugandhar.

  • Hi prabavathym ,
    Could you please let us know whether the issue has been resolved on your end? Your feedback can assist others in the community who may encounter a similar problem.