Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQLCmd batch_abort doesn't work when executing a single script #202

Open
simondean opened this issue Mar 20, 2012 · 0 comments
Open

SQLCmd batch_abort doesn't work when executing a single script #202

simondean opened this issue Mar 20, 2012 · 0 comments

Comments

@simondean
Copy link

At the minute Albacore (incorrectly) assumes that sqlcmd's -b argument should only be used when executing more than one SQL script - however that's not the case. The -b argument is meant for situations when you are executing batches of SQL command and not specifically batches of SQL scripts.

The -b argument is pretty essentially as it enables sqlcmd to "fail fast". The bug is in sqlcmd.rb line 42. The get_batch_abort_param method needs to be changed from:

def get_batch_abort_param
"-b" if (@scripts.length > 1 && @batch_abort)
end

to:

def get_batch_abort_param
"-b" if @batch_abort
end

See http://msdn.microsoft.com/en-us/library/ms162773.aspx for more info on the -b argument.

Many thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant