Page 1 of 1

rollback when sql script fails

Posted: Tue May 20, 2008 5:09 pm
by stradinov
Hi, I'm evaluating InstallAware.

Is't possible to make the installer rollbacks when a sql script fails?

Posted: Tue May 20, 2008 6:06 pm
by LarsS
If you are using MS SQL Server you can just use the Begin, Commit and Rollback transaction commands in your script together with some T-SQL error handling code.
See BOL for more info.

I would assume other SQL servers have similar functionality.

Posted: Wed May 21, 2008 1:53 pm
by jimo
Or check out SET XACT_ABORT in BOL.