Forum Discussion
Connection error while using dataflow in power bi desktop
Hi MostVIP2023,
This looks more like a SQL Server connection issue than a Dataflow issue.
The error says that the connection to SQL Server is established, but it fails during the pre-login handshake. In most cases, I would check the SQL Server connection, TLS/encryption settings, or network/firewall first.
I would try this:
First, connect to the same SQL Server directly from Power BI Desktop using Get Data > SQL Server. If you get the same error there, the Dataflow isn't the cause.
If the direct connection works, then check how the Dataflow is connecting to SQL Server, especially if an on-premises gateway is involved. In that case, test the connection from the gateway machine as well.
Also check whether there were any recent changes to:
- SQL Server or its TLS/encryption configuration
- Power BI Desktop
- SQL Server/ODBC drivers
- VPN, firewall or network security settings
The fact that the TCP connection succeeds but the pre-login handshake fails usually points towards TLS/encryption or something on the network interfering with the connection.
I would start with the direct SQL Server connection from Power BI Desktop. That will quickly tell you whether the problem is with SQL Server connectivity or specifically with the Dataflow/gateway setup.