Resolving T-SQL errors in Fabric

By Hatnest · Reviewed by Saurav Raj Joshi · Updated Nov 30, 2026

T-SQL in a Fabric warehouse looks like SQL Server, but the engine underneath behaves differently. Knowing those differences makes most errors easy to place. This article groups the common problems by what you see and gives the checks to run.

How the warehouse engine behaves

  • Snapshot isolation always. Every transaction runs under snapshot isolation, and changing the isolation level in T-SQL is ignored. Readers do not block writers and writers do not block readers within a transaction's snapshot.
  • Table-level locking. Any data modification locks the whole table, whatever the number of rows. This differs from SQL Server, which can lock rows or pages.
  • Schema locks. DDL takes a schema-modification lock (Sch-M) that stops all other access to the table, and ordinary queries hold a schema-stability lock (Sch-S) that blocks DDL. A schema change during a busy period can therefore wait, or make others wait.

Keep these three facts in mind, because the errors below follow from them.

Problem 1: connection fails that used to work

If a connection fails with no change to permissions, firewall or network, suspect a transient fault. Check that the warehouse is not paused, then wait 5 to 10 minutes and open a new connection instead of retrying immediately. Most platform reconfigurations finish in under a minute. If it still fails, connect from a different tool or machine. Build retry logic into applications and pipelines that call the warehouse.

Problem 2: update conflicts (errors 24556 and 24706)

Two concurrent transactions that UPDATE, DELETE, MERGE or TRUNCATE the same table cause a write-write conflict. The second one is aborted with a snapshot isolation message, and the message tells you to retry. Reading does not cause this.

To avoid them:

  • Do not run concurrent UPDATE, DELETE or MERGE statements on the same table, including inside multi-step transactions.
  • Add retry logic with a delay and exponential back-off in stored procedures, pipelines and applications.
  • Serialize loads to the same table, for example by chaining pipeline activities instead of running them in parallel.

Problem 3: queries wait or seem stuck

Often a session holds a lock. Work through the DMVs. The minimum role needed to query them is Viewer.

-- 1. Who is waiting on a lock?
SELECT request_session_id, resource_type, request_mode, request_status
FROM sys.dm_tran_locks
WHERE request_status = 'WAIT';

-- 2. Which request is blocked, and by whom?
SELECT session_id, blocking_session_id, wait_type,
       total_elapsed_time, open_transaction_count
FROM sys.dm_exec_requests
WHERE blocking_session_id <> 0;

A nonzero blocking_session_id with an open transaction means the blocker is holding a lock. Next, look at the locks that the blocking session holds (request_status = 'GRANT') to see which table and which mode, usually X or Sch-M. The preferred fix is to ask the owner to COMMIT or ROLLBACK, because an unfinished transaction is the usual cause. If you must stop it, a workspace Admin can run KILL <session_id>, which cancels and rolls back that session. Wrap your own transactions in TRY ... CATCH so that they always finish.

Prevent repeat problems by running DDL in maintenance windows and keeping transactions short.

Problem 4: out of tempdb space

A query can fail because the internal tempdb fills up. Users cannot see or configure it. Reduce the pressure:

  • Make sure column statistics exist on all tables and update them after large DML changes.
  • Reduce the number of GROUP BY and ORDER BY columns, especially for queries that return a lot of data.
  • Rerun when little else is running.

Problem 5: a query runs for a long time, then returns nothing

The statement may have finished on the server but failed while returning rows. Run the same query in another client, such as the portal's SQL query editor, SSMS or the MSSQL extension for Visual Studio Code. If it still fails, run it as CTAS into another table. CTAS keeps the results inside the warehouse, so if it succeeds the problem is in the client or the result transfer, not in the query.

Problem 6: slower over time

Compare a good run with a bad one: table size, skew, concurrency, available resources. Verify statistics, update them after big loads, check for skew, and rerun when the warehouse is quiet.

If you open a support case

Collect the workspace ID, the statement ID and distributed request ID that the engine returns as messages, the exact error text and the time.

For the exam

  • The warehouse always uses snapshot isolation and table-level locks.
  • Errors 24556 and 24706 are update conflicts; retry with back-off and avoid concurrent writes to one table.
  • Find blockers with sys.dm_tran_locks and sys.dm_exec_requests; only a workspace Admin can run KILL.
  • For a transient connection error, wait, then reconnect with a new connection.
  • tempdb problems are helped by statistics and fewer GROUP BY and ORDER BY columns; CTAS separates a client problem from a query problem.

Sources