rollback when sql script fails

Got a problem you cannot solve? Try here.
Post Reply
stradinov
Posts: 1
Joined: Tue May 20, 2008 5:04 pm

rollback when sql script fails

Post by stradinov »

Hi, I'm evaluating InstallAware.

Is't possible to make the installer rollbacks when a sql script fails?
LarsS
Posts: 18
Joined: Mon Nov 19, 2007 8:03 pm

Post 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.
jimo
Posts: 342
Joined: Fri Aug 19, 2005 10:59 am
Location: Atlanta, GA
Contact:

Post by jimo »

Or check out SET XACT_ABORT in BOL.
Jim Oswell
Software Engineering Manager, Dental
Greenway Health, LLC
http://greenwaymedical.com
Post Reply