SET NOEXEC ON

ROOYEVAARROOYEVAAR Posts: 8
edited November 8, 2010 8:24AM in SQL Multi Script
Hi,

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?

Regards, Ralph

Comments

  • Brian DonahueBrian Donahue Posts: 6,590 New member
    Hi Ralph,

    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.
Sign In or Register to comment.