Viewing 3 posts - 1 through 3 (of 3 total)
Sqlfrenzy (8/11/2009)
Is their a way to handle begin tran statement when executing script thru sqlcmd...
Yep, you could use a transaction like this:
begin tran
:r "C:\sqlscripts\01.script1.sql"
if (@@error != 0) goto endRollback
...
August 11, 2009 at 4:54 am
Yes, the resulting script must be run in SQLCMD mode.
The ability to include .sql files into other .sql files is really useful and SQLCMD certainly has more features I should...
August 10, 2009 at 1:01 am
Thanks for sharing the .bat code.
For daily scripts deployment on multiple databases, I usually build a SQLCMD script in 2 steps:
1. Copy the .sql file paths into a new file,...
August 4, 2009 at 12:34 am
Viewing 3 posts - 1 through 3 (of 3 total)