| title | Refresh SQL Endpoint Activity |
|---|---|
| description | Learn how to use the Refresh SQL Endpoint activity in Microsoft Fabric pipelines to ensure your Lakehouse SQL endpoint reflects the latest data for downstream processes. |
| ms.date | 02/17/2026 |
| ms.topic | how-to |
The Refresh SQL Endpoint activity in Microsoft Fabric pipelines lets you programmatically refresh a Lakehouse SQL endpoint as part of an orchestrated workflow. This approach ensures that downstream consumers—such as Power BI reports, notebooks, or external SQL clients—see the latest data after data preparation or maintenance steps complete.
Use this activity to make SQL endpoints immediately reflect recent updates without relying on manual refreshes or ad-hoc processes. Use this activity when your pipeline:
- Updates or maintains Lakehouse data (for example, after Copy Jobs, Notebook execution, or Lakehouse maintenance activities).
- Requires the Lakehouse SQL endpoint to reflect the latest metadata and data changes.
- Needs deterministic refresh timing before downstream steps such as reporting, analytics, or exports.
Before using this activity, make sure that:
- A tenant account with an active subscription. Create an account for free.
- A workspace with a Lakehouse
- A SQL endpoint exists for the Lakehouse.
- The pipeline identity (user or service principal) has permission to refresh the SQL endpoint.
-
Create a new pipeline in your workspace.
-
Search for Refresh SQL Endpoint in the pipeline Activities pane and select it to add it to the pipeline canvas.
:::image type="content" source="media/refresh-sql-endpoint-activity/refresh-sql-endpoint-activities.png" alt-text="Screenshot of the Refresh SQL Endpoint activity in the Activities pane." lightbox="media/refresh-sql-endpoint-activity/refresh-sql-endpoint-activities.png":::
-
Select the new Refresh SQL Endpoint activity on the canvas if it isn't already selected.
:::image type="content" source="media/refresh-sql-endpoint-activity/refresh-sql-endpoint-on-canvas.png" alt-text="Screenshot of the Refresh SQL Endpoint activity on the pipeline canvas." lightbox="media/refresh-sql-endpoint-activity/refresh-sql-endpoint-on-canvas.png":::
-
Refer to the General settings guidance to configure the General settings tab.
-
Select the Settings tab to configure the activity.
-
Configure connection by selecting an existing connection from the Connection dropdown, or creating a new connection, and specifying its configuration details.
-
Specify the Workspace that contains the Lakehouse.
-
Specify the SQL Endpoint that contains the materialized lake view to refresh. This SQL endpoint is the Lakehouse whose SQL endpoint you want to refresh. The SQL endpoint associated with the selected Lakehouse.
:::image type="content" source="media/refresh-sql-endpoint-activity/refresh-sql-endpoint-settings.png" alt-text="Screenshot of the Refresh SQL Endpoint activity settings." lightbox="media/refresh-sql-endpoint-activity/refresh-sql-endpoint-settings.png":::
When the activity run finishes:
-
If the Output pop-up shows the Success status, the request syncs unsynced data successfully.
:::image type="content" source="media/refresh-sql-endpoint-activity/refresh-sql-endpoint-success.png" alt-text="Screenshot of a Success status in the activity Output pop-up." lightbox="media/refresh-sql-endpoint-activity/refresh-sql-endpoint-success.png":::
-
A NotRun status in the Output pop-up means that the refresh of the SQL endpoint didn't run. That condition usually means that you didn't add new data since the last sync, so you didn't need to run it.
:::image type="content" source="media/refresh-sql-endpoint-activity/refresh-sql-endpoint-not-run.png" alt-text="Screenshot of a NotRun status in the activity Output pop-up." lightbox="media/refresh-sql-endpoint-activity/refresh-sql-endpoint-not-run.png":::
-
If the Output pop-up shows the Failure status, something went wrong.
Note
The activity run sets these statuses in the Output pop-up. Don't confuse these statuses with the activity status itself.
- Refreshing the SQL endpoint after a Notebook writes transformed data to a Lakehouse.
- Triggering a SQL endpoint refresh after Optimize or Vacuum operations complete.
- Ensuring reports and dashboards query the most recent Lakehouse state at well‑defined points in a pipeline.
The Refresh SQL Endpoint activity can fail intermittently when other processes actively update the underlying Lakehouse data. These processes include ingestion pipelines, notebooks, or concurrent write operations.
This failure happens because the SQL Endpoint needs to acquire internal locks to complete the refresh. If another operation locks the data, the request times out or returns an error.
This behavior is expected based on how SQL Endpoints manage metadata refresh operations.
- The activity fails intermittently, not consistently.
- Error messages indicate refresh conflicts or lock contention.
- Pipelines with multiple sequential Refresh SQL Endpoint activities show higher failure rates.
SQL Endpoints require exclusive access to certain metadata structures during refresh. If another compute process writes to the Lakehouse at the same time, lock contention occurs.
This behavior isn't a defect in the Refresh SQL Endpoint activity. It's the natural result of concurrent read and write operations on the underlying data.
Two practical approaches can mitigate this issue:
- Use Only One Refresh SQL Endpoint Activity at the End of Processing
- Implement a Recurring Refresh Schedule
To reduce the likelihood of lock conflicts, consolidate your pipeline so that:
- All ingestion, transformation, and update activities run first,
- Then only one Refresh SQL Endpoint activity executes at the end.
- This approach doesn't eliminate failures completely, but greatly reduces how often they occur.
If your scenario doesn't require strict transactional consistency at a specific moment, adopt a recurring refresh pattern:
- Schedule a refresh every 15 minutes—continuously. Some refresh attempts might fail due to locking, but enough succeed to keep your SQL Endpoint relatively up to date.
:::image type="content" source="media/refresh-sql-endpoint-activity/refresh-sql-endpoint-schedule.png" alt-text="Screenshot of a recurring Refresh SQL Endpoint schedule configuration." lightbox="media/refresh-sql-endpoint-activity/refresh-sql-endpoint-schedule.png":::
This approach is practical and robust for many analytics workloads.
[!INCLUDEsave-run-schedule-pipeline]
- The Refresh SQL Endpoint activity might intermittently fail when other processes actively update the underlying Lakehouse data. For workarounds, see the section Why is my SQL Endpoint Refresh failing when underlying data is locked?