SQL Server – transactions roll back on error? August 6, 2022 by Tarik You can put set xact_abort on before your transaction to make sure sql rolls back automatically in case of error.