MetricSign
EN|NLRequest Access
High severitydata source

Power BI Refresh Error:
SqlConnectionIsClosed

What does this error mean?

The SQL connection was unexpectedly closed during an ADF copy activity — before the copy completed. Common causes: transient network drops between the integration runtime and SQL Server, a SQL Server restart or failover during the copy, or an idle connection timeout killing a long-running bulk insert.

Common causes

  • 1A transient network disruption between the integration runtime and the SQL server
  • 2The SQL server was restarted or failed over during the copy operation
  • 3The connection idle timeout on the SQL server or firewall closed the connection during a long-running batch
  • 4The self-hosted integration runtime machine ran out of network socket resources

How to fix it

  1. 1Add a retry policy to the copy activity (Settings > Retry: 3 retries, 60-second retry interval) — most transient connection drops resolve on retry.
  2. 2Check the SQL Server error log (ERRORLOG file or SQL Server Management Studio > Management > SQL Server Logs) for any restarts, failovers, or 'connection killed' events during the failure window.
  3. 3Increase the SQL Server 'remote query timeout' and 'connection timeout' settings if the copy activity runs for more than 30 minutes.
  4. 4Reduce the copy activity batch size (writeBatchSize) to shorten the duration of each individual write operation, reducing the window for idle connection timeouts.
  5. 5If using a self-hosted IR, verify the network path between the IR host and the SQL Server is stable — run a sustained ping during the copy window to detect packet loss.

Frequently asked questions

Does this error affect all pipeline runs or just the current one?

Depends on the root cause. A persistent misconfiguration fails every run; a transient issue may resolve on retry. Check the run history.

Can this error appear in Azure Data Factory and Microsoft Fabric pipelines?

Yes — the same connector errors appear in both ADF and Fabric Data Factory pipelines.

How do I see the full error detail for an ADF pipeline failure?

In ADF Monitor, click the failed run, then the failed activity. The detail pane shows the error code, message, and sub-error codes.

Will downstream Power BI datasets be affected when an ADF pipeline fails?

Yes — a dataset refreshing after the pipeline will use stale data or fail if the target table was cleared. The Power BI refresh may succeed while serving wrong data.

Official documentation: https://learn.microsoft.com/en-us/azure/data-factory/connector-troubleshoot-synapse-sql

Other data source errors