Forum Replies Created

Viewing 3 posts - 1 through 3 (of 3 total)

  • RE: A Simple way of Automating Scripts

    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

    ...

  • RE: A Simple way of Automating Scripts

    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...

  • RE: A Simple way of Automating Scripts

    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,...

Viewing 3 posts - 1 through 3 (of 3 total)