High severitydata source
Power BI Refresh Error:
SqlBatchWriteTransactionFailed
What does this error mean?
An ADF copy activity batch write to SQL Server failed and the transaction was rolled back — any constraint violation or transaction error rejects the entire batch.
Common causes
- 1A row in the batch violates a primary key, unique, or foreign key constraint
- 2A null value in the batch was inserted into a NOT NULL column
- 3A deadlock occurred on the destination table during the batch write
- 4The transaction log of the SQL database filled up during the batch write
How to fix it
- 1Check the ADF activity run error for the specific SQL error code within the transaction failure.
- 2Enable fault tolerance on the copy activity to skip failed rows and log them to storage for investigation.
- 3Review the source data for constraint violations before the copy — deduplicate on key columns.
- 4If a deadlock: add a retry policy with exponential backoff to the copy activity.
- 5Monitor SQL transaction log usage and grow the log file or enable auto-growth if needed.
Frequently asked questions
Official documentation: https://learn.microsoft.com/en-us/azure/data-factory/connector-troubleshoot-synapse-sql