We help IT Professionals succeed at work.

SSIS: Fail 'Execute SQL Task' container based on returned result.

364 Views
Last Modified: 2012-05-11
I have an SSIS package which has a 'Execute SQL Task' componenet. This task calls some SQL and returns 0 if everything is OK and 1 if an error has been found. This code is all working as expected. What I am looking for is a way to fail the component if the return code is > 0.

The 'Execute Process Task' has similar functionality where you can use the 'FailTaskIfReturnCodeIsNotSuccessValue' and 'SuccessValue' fields. I need the equivelent functionality for the 'Execute SQL Task'.
Comment
Watch Question

Daniel_PLDB Expert/Architect
Top Expert 2011

Commented:
You can use RAISERROR depending on return value of your code in t-sql code inside task.
Solution Architect at TCS (SAFe®Agilist, TOGAF® Foundation, PSM I®, MCP, MCSD)
CERTIFIED EXPERT
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Author

Commented:
Thanks for this suggestion, I agree that this may be the best way forward... I was hoping that the component could handle this itself rather than relying on a script component? Also why is there no SSIS section on EE?
Alpesh PatelSolution Architect at TCS (SAFe®Agilist, TOGAF® Foundation, PSM I®, MCP, MCSD)
CERTIFIED EXPERT

Commented:
There is section for SSIS named SSIS_SSAS
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.