Single-click script execution on multiple SQL Servers.
Moderators: JonathanWatts, Anu Deshpande, dlkj, Colin Millerchip, Michelle Taylor
I ran into a tricky situation here; I use mutliscript to deploy stored procedures, one stored proc per script file.
Some scripts have an error handler in them, where if something goes wrong, a rollback and a SET NOEXEC ON are executed.
Now it seems that the SET NOEXEC ON setting lasts throughout the entire run of Multiscript, all other scripts act like they actually worked, but they actually did not.
Is it somehow possible to limit whatever settings are changed to the one script they are changed in, besides of course putting ie SET NOEXEC OFF on top of each script?
- Posts: 5
- Joined: Wed Apr 07, 2010 9:31 am
I'd imagine that SET NOEXEC will apply to the whole session, and Multi Script is probably keeping sessions to the same server open for multiple scripts, because logons are expensive. I don't see a way around this -- your best bet is probably to put SET NOEXEC OFF after your error handling.
- Posts: 6668
- Joined: Mon Aug 23, 2004 10:48 am
Return to SQL Multi Script 1
Who is online
Users browsing this forum: No registered users and 0 guests