Skip to main content David Edelstein's Blog

🦙
🦙

SQL Server Tip - SET NOEXEC ON

Published: 2015-06-05
dave@edelsteinautomotive.com
David Edelstein

https://msdn.microsoft.com/en-us/library/ms188394.aspx


SET NOEXEC ON

Sometimes its easy to work on a stored proc by pasting a bunch of code into the stored proc body and then removing params that are unused as the query compiler complains. However, if your script includes a drop procedure in it, you might lose your procedure before you’ve figured out how to get the new version to compile.

Setting NOEXEC ON lets you enjoy the warning messages without actually running the drop or create. When you’ve fixed your stored proc and it stops getting error messages, you can remove the NOEXEC ON line and run the script to completion.