Created
April 10, 2013 20:32
-
-
Save troyscott/5358185 to your computer and use it in GitHub Desktop.
Check error level after the SSIS package completes. If the error level does not 0 stop running the batch file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ECHO OFF | |
SET DTEXEC_PATH="C:\Program Files\Microsoft SQL Server\110\DTS\Binn\dtexec.exe" | |
%DTEXEC_PATH% /FILE batch_success.dtsx | |
IF %ERRORLEVEL% NEQ 0 GOTO STOP_JOB | |
%DTEXEC_PATH% /FILE batch_fail.dtsx | |
IF %ERRORLEVEL% NEQ 0 GOTO STOP_JOB | |
%DTEXEC_PATH% /FILE batch_success.dtsx | |
IF %ERRORLEVEL% NEQ 0 GOTO STOP_JOB | |
GOTO END | |
:STOP_JOB | |
GOTO END | |
:END |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
good job!