How to undo SQL changes using installer
Posted
by
Sunil Agarwal
on Stack Overflow
See other posts from Stack Overflow
or by Sunil Agarwal
Published on 2011-01-15T13:39:55Z
Indexed on
2011/01/15
13:53 UTC
Read the original article
Hit count: 202
I have installer to install procedures, scripts, views, etc in SQL server 2005/2008.
Now I want to add a condition in the installer like if there is any error while installing, I want to undo all the changes done in SQL server.
I tried to store the procedures, views, etc which I am changing while installing and reverting them back if I get any error. But am not able to do it the way I want.
Can someone guide me if he had done the same thing?
To specify I am using WIX installer.
Also if someone has tried SMO, it will be of great help.
© Stack Overflow or respective owner