SQL cmd and error level

  • We have a sql script that uses : SQLCMD -i "C:\ProcessJob.sql"

    to call a sql script, we want to let the SQLCMD to know the status of the job if it succeed or fail.

    How in sqlcmd to include something that catches the status of the sql script job.

    Thanks

  • I think it was -b or -V one of them or both of them are useful.

    In help "SQLCMD -?" you can find out which one to use.

    Alex S
  • I think it is -m

    is that all we need, like below:

    SQLCMD -i "d:\_ssisfiles\scripts\SRR\StartJob.sql" -m

    ?

  • it requires more than the switches to capture the information from a query to be passed to sqlcmd, i think..

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

You must be logged in to reply to this topic. Login to reply