MetricSign
EN|NLRequest Access
High severityexecution

Power BI Refresh Error:
TRANSACTION_ABORTED

What does this error mean?

A Databricks SQL transaction was aborted and all subsequent statements in the same session are rejected until a ROLLBACK TRANSACTION is issued to clear the aborted state.

Common causes

  • 1A statement within an explicit BEGIN TRANSACTION block failed, leaving the transaction in an aborted state
  • 2The session exceeded the idle transaction timeout, causing the transaction to be automatically aborted by the server
  • 3A constraint violation or type error within a transaction caused the entire transaction to be marked as failed

How to fix it

  1. 1Step 1: Issue ROLLBACK TRANSACTION to clear the aborted transaction state before executing any further SQL in the same session.
  2. 2Step 2: Review the previous statement that triggered the abort — check for constraint violations, type mismatches, or timeout conditions.
  3. 3Step 3: Wrap transaction logic in a try/except block and issue ROLLBACK in the exception handler to keep the connection in a usable state.
  4. 4Step 4: If the abort was caused by an idle timeout, reduce the transaction scope to keep it short and avoid leaving connections idle while holding a transaction.

Frequently asked questions

Does this affect auto-commit single-statement queries?

No. Single-statement queries in auto-commit mode do not leave the session in an aborted state if they fail. TRANSACTION_ABORTED only occurs when using explicit BEGIN TRANSACTION blocks.

Can I reconnect instead of issuing ROLLBACK?

Yes. Starting a new session (reconnecting) is equivalent to rolling back and is often the simplest recovery path for batch jobs that create fresh connections per run.

Other execution errors