Red Gate forums :: View topic - SET NOEXEC ON
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Multi Script 1
SQL Multi Script 1 forum

SET NOEXEC ON

Search in SQL Multi Script 1 forum
Post new topic   Reply to topic
Jump to:  
Author Message
ROOYEVAAR



Joined: 07 Apr 2010
Posts: 5

PostPosted: Fri Nov 05, 2010 9:39 am    Post subject: SET NOEXEC ON Reply with quote

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
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6589

PostPosted: Mon Nov 08, 2010 2:24 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group