As far as I read msdn there is no variable that corresponds to the -b flag of the command (on error batch abort).
I found no to enable this mode inside a script when running in sqlcmd mode.
Is there any to force
:r filename
to run in this mode, when called from SSMS?
Sql-server – SQLCMDMODE from SSMS. Can I set -b mode when using :r to include files
sql-server-2005sqlcmd
Related Question
- Sql-server – Which workarounds exists to missing relative path feature of SQLCMD :r
- Sql-server – How to test sql scripts intended to run with sqlcmd -v in Sql Server Management Studio
- Sql-server – SQLCMD – add date to CSV. When run inside Command Prompt it works, when in Job then %date
- Sql-server – Disabling variable substitution inside SQLCMD script when using :r syntax
- Sql-server – Run aspnet_regsql.exe from SQLCMD Post-Deployment Script
- Does SQLCMD “!!” command work in Azure Data Studio
Best Answer
No, you can't.
Not in the supported subset of options: http://msdn.microsoft.com/en-us/library/ms174187.aspx