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...
  • Shubham_rai955's avatar
    9 months ago

    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.