dbTalk Databases Forums  

Re: How to force a SSIS package step to fail?

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Re: How to force a SSIS package step to fail? in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
jhofmeyr@googlemail.com
 
Posts: n/a

Default Re: How to force a SSIS package step to fail? - 03-12-2008 , 05:16 AM






Hi Steen,

Why would you want the package to fail? In DTS (SQL Server 2000) you
could "fail" steps in order to control package flow, but his is not
necessary in SSIS. If you want the package to follow a different
control flow depending on the outcome of the stored procedures, you
can use conditional expressions based on the return values.

To do this, double-click on the connector line joining 2 of your
ExecuteSQL tasks and change the "Evaluation operation:" to any of the
options that include "Expression". This enables you to enter a
boolean expression that must evaluate to true for the path to be
followed. Assuming you've got an int parameter called "sp1rtnvalue"
which must evaluate to 1 for the flow to continue; your expression
would be:

@sp1rtnvalue == 1

Good luck!
J

Reply With Quote
  #2  
Old   
jhofmeyr@googlemail.com
 
Posts: n/a

Default Re: How to force a SSIS package step to fail? - 03-12-2008 , 05:16 AM






Hi Steen,

Why would you want the package to fail? In DTS (SQL Server 2000) you
could "fail" steps in order to control package flow, but his is not
necessary in SSIS. If you want the package to follow a different
control flow depending on the outcome of the stored procedures, you
can use conditional expressions based on the return values.

To do this, double-click on the connector line joining 2 of your
ExecuteSQL tasks and change the "Evaluation operation:" to any of the
options that include "Expression". This enables you to enter a
boolean expression that must evaluate to true for the path to be
followed. Assuming you've got an int parameter called "sp1rtnvalue"
which must evaluate to 1 for the flow to continue; your expression
would be:

@sp1rtnvalue == 1

Good luck!
J

Reply With Quote
  #3  
Old   
jhofmeyr@googlemail.com
 
Posts: n/a

Default Re: How to force a SSIS package step to fail? - 03-12-2008 , 05:16 AM



Hi Steen,

Why would you want the package to fail? In DTS (SQL Server 2000) you
could "fail" steps in order to control package flow, but his is not
necessary in SSIS. If you want the package to follow a different
control flow depending on the outcome of the stored procedures, you
can use conditional expressions based on the return values.

To do this, double-click on the connector line joining 2 of your
ExecuteSQL tasks and change the "Evaluation operation:" to any of the
options that include "Expression". This enables you to enter a
boolean expression that must evaluate to true for the path to be
followed. Assuming you've got an int parameter called "sp1rtnvalue"
which must evaluate to 1 for the flow to continue; your expression
would be:

@sp1rtnvalue == 1

Good luck!
J

Reply With Quote
  #4  
Old   
jhofmeyr@googlemail.com
 
Posts: n/a

Default Re: How to force a SSIS package step to fail? - 03-12-2008 , 05:16 AM



Hi Steen,

Why would you want the package to fail? In DTS (SQL Server 2000) you
could "fail" steps in order to control package flow, but his is not
necessary in SSIS. If you want the package to follow a different
control flow depending on the outcome of the stored procedures, you
can use conditional expressions based on the return values.

To do this, double-click on the connector line joining 2 of your
ExecuteSQL tasks and change the "Evaluation operation:" to any of the
options that include "Expression". This enables you to enter a
boolean expression that must evaluate to true for the path to be
followed. Assuming you've got an int parameter called "sp1rtnvalue"
which must evaluate to 1 for the flow to continue; your expression
would be:

@sp1rtnvalue == 1

Good luck!
J

Reply With Quote
  #5  
Old   
jhofmeyr@googlemail.com
 
Posts: n/a

Default Re: How to force a SSIS package step to fail? - 03-12-2008 , 05:16 AM



Hi Steen,

Why would you want the package to fail? In DTS (SQL Server 2000) you
could "fail" steps in order to control package flow, but his is not
necessary in SSIS. If you want the package to follow a different
control flow depending on the outcome of the stored procedures, you
can use conditional expressions based on the return values.

To do this, double-click on the connector line joining 2 of your
ExecuteSQL tasks and change the "Evaluation operation:" to any of the
options that include "Expression". This enables you to enter a
boolean expression that must evaluate to true for the path to be
followed. Assuming you've got an int parameter called "sp1rtnvalue"
which must evaluate to 1 for the flow to continue; your expression
would be:

@sp1rtnvalue == 1

Good luck!
J

Reply With Quote
  #6  
Old   
jhofmeyr@googlemail.com
 
Posts: n/a

Default Re: How to force a SSIS package step to fail? - 03-12-2008 , 05:16 AM



Hi Steen,

Why would you want the package to fail? In DTS (SQL Server 2000) you
could "fail" steps in order to control package flow, but his is not
necessary in SSIS. If you want the package to follow a different
control flow depending on the outcome of the stored procedures, you
can use conditional expressions based on the return values.

To do this, double-click on the connector line joining 2 of your
ExecuteSQL tasks and change the "Evaluation operation:" to any of the
options that include "Expression". This enables you to enter a
boolean expression that must evaluate to true for the path to be
followed. Assuming you've got an int parameter called "sp1rtnvalue"
which must evaluate to 1 for the flow to continue; your expression
would be:

@sp1rtnvalue == 1

Good luck!
J

Reply With Quote
  #7  
Old   
jhofmeyr@googlemail.com
 
Posts: n/a

Default Re: How to force a SSIS package step to fail? - 03-12-2008 , 05:16 AM



Hi Steen,

Why would you want the package to fail? In DTS (SQL Server 2000) you
could "fail" steps in order to control package flow, but his is not
necessary in SSIS. If you want the package to follow a different
control flow depending on the outcome of the stored procedures, you
can use conditional expressions based on the return values.

To do this, double-click on the connector line joining 2 of your
ExecuteSQL tasks and change the "Evaluation operation:" to any of the
options that include "Expression". This enables you to enter a
boolean expression that must evaluate to true for the path to be
followed. Assuming you've got an int parameter called "sp1rtnvalue"
which must evaluate to 1 for the flow to continue; your expression
would be:

@sp1rtnvalue == 1

Good luck!
J

Reply With Quote
  #8  
Old   
jhofmeyr@googlemail.com
 
Posts: n/a

Default Re: How to force a SSIS package step to fail? - 03-12-2008 , 05:16 AM



Hi Steen,

Why would you want the package to fail? In DTS (SQL Server 2000) you
could "fail" steps in order to control package flow, but his is not
necessary in SSIS. If you want the package to follow a different
control flow depending on the outcome of the stored procedures, you
can use conditional expressions based on the return values.

To do this, double-click on the connector line joining 2 of your
ExecuteSQL tasks and change the "Evaluation operation:" to any of the
options that include "Expression". This enables you to enter a
boolean expression that must evaluate to true for the path to be
followed. Assuming you've got an int parameter called "sp1rtnvalue"
which must evaluate to 1 for the flow to continue; your expression
would be:

@sp1rtnvalue == 1

Good luck!
J

Reply With Quote
  #9  
Old   
jhofmeyr@googlemail.com
 
Posts: n/a

Default Re: How to force a SSIS package step to fail? - 03-13-2008 , 05:27 AM



Hi Steen,

There is no concept of "Length" in a package string variable - it is
as long as you make it.
Try deleting and re-creating the ExecuteSQL task. Sometimes when you
change a stored proc the metadata in SSIS doesn't update correctly.
You might also consider changing your SP into a function if all it's
doing is returning a value...

I think using expressions is a better method of controling application
flow than Succ/Fail/Comp ... what happens if your task were to
actually fail?

Good luck!
J

Reply With Quote
  #10  
Old   
jhofmeyr@googlemail.com
 
Posts: n/a

Default Re: How to force a SSIS package step to fail? - 03-13-2008 , 05:27 AM



Hi Steen,

There is no concept of "Length" in a package string variable - it is
as long as you make it.
Try deleting and re-creating the ExecuteSQL task. Sometimes when you
change a stored proc the metadata in SSIS doesn't update correctly.
You might also consider changing your SP into a function if all it's
doing is returning a value...

I think using expressions is a better method of controling application
flow than Succ/Fail/Comp ... what happens if your task were to
actually fail?

Good luck!
J

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.