stop dts pakage execution

  • Hi,

    I have created 3 dts packages. first package will load data into the sql server tables. the second package will perform series of validations. the third package will update the tables only if all the validations have been passed. I created a new package which will run all the above packages one by one. I'm not knowing how to stop the package execution if the second package was failed. I tried setting like on succees-->third package, on failure --> active x script. Even if the second package failed, it is running the third package. please let me know how to do this.

    Thanks,

    sridhar!!

  • Are you sure that the second package is showing a failure on execution?

    What about if you set the three packages as 3 steps in a job?



    Shamless self promotion - read my blog http://sirsql.net

  • Yes, the second package is showing a failure but still the third package is running. I don't know how to set packages as steps in a job.

    Thanks,

    Sriidhar!!

  • Within a job use the DTSRUN utitlity. You can use this to execute each package and set an on success/failure for each.

    You can look up the syntax in BOL, however basically set the job step as a command line execution and set the command as

     

    DTSRUN /SSQLSERVER /N"DTS Package" /E

     

    where SQLSERVER is the SQL Server that the DTS resides on and DTS Package is the package name. /E forces the use of trusted authentication (the sql server agent service account), you could use /U /P if you want to use a username and passwrod to connect instead.



    Shamless self promotion - read my blog http://sirsql.net

  • Hi Nicholas,

    Thanks for the help. I tried by setting the package properties as fail package on first error. it is working now.

    Thanks,

    Sridhar!!

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

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