Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
qman
Constraint Violating Yak Guru
442 Posts |
Posted - 2010-10-13 : 10:44:50
|
Anyone have any code samples on how to script a task that will write pass/fail to a sql table upon completion of an ssis package?I am looking to use a script task as the last step in a package.The script task will check if the previous step has passed or failed. It will then write to a SQL table the results of the package. Thanks |
|
russell
Pyro-ma-ni-yak
5072 Posts |
Posted - 2010-10-13 : 11:03:57
|
Can use the precedence constraint of the last stepOn success of last step:INSERT INTO YourTable (runDate, passFail) VALUES (getdate(), 'PASS')On failure of itINSERT INTO YourTable (runDate, passFail) VALUES (getdate(), 'FAIL') |
|
|
qman
Constraint Violating Yak Guru
442 Posts |
Posted - 2010-10-13 : 11:24:22
|
I did something similar using 2 SQL Tasks, writing to the table based on the passing or failing of the constraint.I was hoping to avoid having 2 SQL Tasks and make use of a script task, which would test for pass/fail, inserting specific values based on the overall success/failure. |
|
|
|
|
|