metricsign
Start free
Critical severityconnection

Power BI Refresh Error:
2

What does this error mean?

The client cannot establish a TCP connection to the SQL Server — the server name is wrong, the port is blocked, or SQL Server is not running.

Common causes

  • 1Wrong server name, instance name, or port in the connection string
  • 2SQL Server service is stopped
  • 3Firewall blocking TCP port 1433 (or custom port) between client and server

How to fix it

  1. 1Step 1: Verify SQL Server is running: in SSMS Object Explorer connect with the exact server name, or run: Test-NetConnection -ComputerName <servername> -Port 1433 from the client.
  2. 2Step 2: Check firewall rules — ensure TCP 1433 (or the custom port) is open inbound on the SQL Server and outbound on the client. For ADF self-hosted IR, check the IR machine's outbound rules.
  3. 3Step 3: Verify the connection string format: for a named instance use <server>\<instance>,<port> or enable the SQL Server Browser service so instance names resolve automatically.

Frequently asked questions

How do I test SQL Server connectivity from an ADF self-hosted IR?

Log in to the IR machine and run: Test-NetConnection -ComputerName <sql-server-host> -Port 1433. A successful TCP connection shows TcpTestSucceeded: True.

Does error 2 differ from error 53?

Error 2 is a general connection failure (provider-level). Error 53 is specifically a named pipes network path not found. Both indicate the server is unreachable but via different protocols.

Can Azure SQL Database return error 2?

Yes — if the Azure SQL server name is wrong, the server firewall blocks the client IP, or the server is paused (serverless tier). Check the Azure portal firewall rules and server status.

Official documentation: https://learn.microsoft.com/en-us/sql/relational-databases/errors-events/mssqlserver-2-database-engine-error

Other connection errors