High severityresource
Power BI Refresh Error:
1412
What does this error mean?
A DDL change (ALTER TABLE, CREATE INDEX, etc.) was executed while an open transaction was using the table.
Common causes
- 1An ALTER TABLE runs while ADF copy activities or dbt models have open transactions on the table
- 2Online DDL operations (adding indexes, changing columns) invalidate the table cache used by existing transactions
- 3Migration scripts run during active pipeline windows without proper coordination
How to fix it
- 1Step 1: Retry the transaction — MySQL rolls back the affected transaction and the client should retry.
- 2Step 2: Schedule DDL operations during pipeline maintenance windows when no transactions are active on the table.
- 3Step 3: For ADF, configure retry on the activity: MySQL will release the DDL lock once all open transactions close.
- 4Step 4: Use pt-online-schema-change or gh-ost for large table DDL changes to minimize the impact window.
Frequently asked questions
Official documentation: https://dev.mysql.com/doc/mysql-errors/8.0/en/server-error-reference.html