![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I have the following code where I am executing the steps. My problem is how do I not execute the steps and set the DTSTaskExecResult as Success? If DateDiff("h", File.DateLastModified, Now ) <= 24 Then Set oPackage = DTSGlobalVariables.Parent oPackage.Steps("DTSStep_DTSExecuteSQLTask_1").Exec ute oPackage.Steps("DTSStep_DTSDataDrivenQueryTask_1") .Execute else ???? End if Main = DTSTaskExecResult_Success End if |
#3
| |||
| |||
|
|
You can simply skip the steps if you want Skip the execution of an individual Task (http://www.sqldts.com/default.aspx?214) -- Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP) www.SQLDTS.com - The site for all your DTS needs. www.Konesans.com "anonymous22" <anonymous (AT) discussions (DOT) microsoft.com> wrote I have the following code where I am executing the steps. My problem is how do I not execute the steps and set the DTSTaskExecResult as Success? If DateDiff("h", File.DateLastModified, Now ) <= 24 Then Set oPackage = DTSGlobalVariables.Parent oPackage.Steps("DTSStep_DTSExecuteSQLTask_1").Exec ute oPackage.Steps("DTSStep_DTSDataDrivenQueryTask_1") .Execute else ???? End if Main = DTSTaskExecResult_Success End if |
#4
| |||
| |||
|
|
Allan, I tried to look at the link that you provide and Can you please explain to me what is PrecedenceConstraints(1).PrecedenceBasis = DTSStepPrecedenceBasis_ExecStatus I tried to look at the help but still don't quite get the idea about how it works... Thanks Ed "Allan Mitchell" wrote: You can simply skip the steps if you want Skip the execution of an individual Task (http://www.sqldts.com/default.aspx?214) -- Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP) www.SQLDTS.com - The site for all your DTS needs. www.Konesans.com "anonymous22" <anonymous (AT) discussions (DOT) microsoft.com> wrote I have the following code where I am executing the steps. My problem is how do I not execute the steps and set the DTSTaskExecResult as Success? If DateDiff("h", File.DateLastModified, Now ) <= 24 Then Set oPackage = DTSGlobalVariables.Parent oPackage.Steps("DTSStep_DTSExecuteSQLTask_1").Exec ute oPackage.Steps("DTSStep_DTSDataDrivenQueryTask_1") .Execute else ???? End if Main = DTSTaskExecResult_Success End if |
#5
| |||
| |||
|
|
What we are basically saying is "Do not execute this task but make it look to the task ahead of this (oStep (page 2) - because this is where the Precedence Constraint with our second task is referenced ) like I completed normally and you should follow the On Success workflow. In the scenario we are looking at the Execution Status of the task and not the result because if we do not run the task we won't have one. Did you find where to put this script? -- Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP) www.SQLDTS.com - The site for all your DTS needs. www.Konesans.com "Ed" <Ed (AT) discussions (DOT) microsoft.com> wrote Allan, I tried to look at the link that you provide and Can you please explain to me what is PrecedenceConstraints(1).PrecedenceBasis = DTSStepPrecedenceBasis_ExecStatus I tried to look at the help but still don't quite get the idea about how it works... Thanks Ed "Allan Mitchell" wrote: You can simply skip the steps if you want Skip the execution of an individual Task (http://www.sqldts.com/default.aspx?214) -- Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP) www.SQLDTS.com - The site for all your DTS needs. www.Konesans.com "anonymous22" <anonymous (AT) discussions (DOT) microsoft.com> wrote I have the following code where I am executing the steps. My problem is how do I not execute the steps and set the DTSTaskExecResult as Success? If DateDiff("h", File.DateLastModified, Now ) <= 24 Then Set oPackage = DTSGlobalVariables.Parent oPackage.Steps("DTSStep_DTSExecuteSQLTask_1").Exec ute oPackage.Steps("DTSStep_DTSDataDrivenQueryTask_1") .Execute else ???? End if Main = DTSTaskExecResult_Success End if |
#6
| |||
| |||
|
|
The PrecedenceContraints(1) refers to the OnSuccess between Task2 and Task3? what is DTSStepExecStat_Inactive thanks again Ed "Allan Mitchell" wrote: What we are basically saying is "Do not execute this task but make it look to the task ahead of this (oStep (page 2) - because this is where the Precedence Constraint with our second task is referenced ) like I completed normally and you should follow the On Success workflow. In the scenario we are looking at the Execution Status of the task and not the result because if we do not run the task we won't have one. Did you find where to put this script? -- Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP) www.SQLDTS.com - The site for all your DTS needs. www.Konesans.com "Ed" <Ed (AT) discussions (DOT) microsoft.com> wrote Allan, I tried to look at the link that you provide and Can you please explain to me what is PrecedenceConstraints(1).PrecedenceBasis = DTSStepPrecedenceBasis_ExecStatus I tried to look at the help but still don't quite get the idea about how it works... Thanks Ed "Allan Mitchell" wrote: You can simply skip the steps if you want Skip the execution of an individual Task (http://www.sqldts.com/default.aspx?214) -- Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP) www.SQLDTS.com - The site for all your DTS needs. www.Konesans.com "anonymous22" <anonymous (AT) discussions (DOT) microsoft.com> wrote I have the following code where I am executing the steps. My problem is how do I not execute the steps and set the DTSTaskExecResult as Success? If DateDiff("h", File.DateLastModified, Now ) <= 24 Then Set oPackage = DTSGlobalVariables.Parent oPackage.Steps("DTSStep_DTSExecuteSQLTask_1").Exec ute oPackage.Steps("DTSStep_DTSDataDrivenQueryTask_1") .Execute else ???? End if Main = DTSTaskExecResult_Success End if |
#7
| |||
| |||
|
|
The PrecedenceContraints(1) refers to the OnSuccess between Task2 and Task3? what is DTSStepExecStat_Inactive thanks again Ed "Allan Mitchell" wrote: What we are basically saying is "Do not execute this task but make it look to the task ahead of this (oStep (page 2) - because this is where the Precedence Constraint with our second task is referenced ) like I completed normally and you should follow the On Success workflow. In the scenario we are looking at the Execution Status of the task and not the result because if we do not run the task we won't have one. Did you find where to put this script? -- Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP) www.SQLDTS.com - The site for all your DTS needs. www.Konesans.com "Ed" <Ed (AT) discussions (DOT) microsoft.com> wrote Allan, I tried to look at the link that you provide and Can you please explain to me what is PrecedenceConstraints(1).PrecedenceBasis = DTSStepPrecedenceBasis_ExecStatus I tried to look at the help but still don't quite get the idea about how it works... Thanks Ed "Allan Mitchell" wrote: You can simply skip the steps if you want Skip the execution of an individual Task (http://www.sqldts.com/default.aspx?214) -- Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP) www.SQLDTS.com - The site for all your DTS needs. www.Konesans.com "anonymous22" <anonymous (AT) discussions (DOT) microsoft.com> wrote I have the following code where I am executing the steps. My problem is how do I not execute the steps and set the DTSTaskExecResult as Success? If DateDiff("h", File.DateLastModified, Now ) <= 24 Then Set oPackage = DTSGlobalVariables.Parent oPackage.Steps("DTSStep_DTSExecuteSQLTask_1").Exec ute oPackage.Steps("DTSStep_DTSDataDrivenQueryTask_1") .Execute else ???? End if Main = DTSTaskExecResult_Success End if |
#8
| |||
| |||
|
|
The PrecedenceContraints(1) refers to the OnSuccess between Task2 and Task3? what is DTSStepExecStat_Inactive thanks again Ed "Allan Mitchell" wrote: What we are basically saying is "Do not execute this task but make it look to the task ahead of this (oStep (page 2) - because this is where the Precedence Constraint with our second task is referenced ) like I completed normally and you should follow the On Success workflow. In the scenario we are looking at the Execution Status of the task and not the result because if we do not run the task we won't have one. Did you find where to put this script? -- Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP) www.SQLDTS.com - The site for all your DTS needs. www.Konesans.com "Ed" <Ed (AT) discussions (DOT) microsoft.com> wrote Allan, I tried to look at the link that you provide and Can you please explain to me what is PrecedenceConstraints(1).PrecedenceBasis = DTSStepPrecedenceBasis_ExecStatus I tried to look at the help but still don't quite get the idea about how it works... Thanks Ed "Allan Mitchell" wrote: You can simply skip the steps if you want Skip the execution of an individual Task (http://www.sqldts.com/default.aspx?214) -- Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP) www.SQLDTS.com - The site for all your DTS needs. www.Konesans.com "anonymous22" <anonymous (AT) discussions (DOT) microsoft.com> wrote I have the following code where I am executing the steps. My problem is how do I not execute the steps and set the DTSTaskExecResult as Success? If DateDiff("h", File.DateLastModified, Now ) <= 24 Then Set oPackage = DTSGlobalVariables.Parent oPackage.Steps("DTSStep_DTSExecuteSQLTask_1").Exec ute oPackage.Steps("DTSStep_DTSDataDrivenQueryTask_1") .Execute else ???? End if Main = DTSTaskExecResult_Success End if |
#9
| |||
| |||
|
#10
| |||
| |||
|
|
What if I wanted to skip instead of 1 task 3? |
![]() |
| Thread Tools | |
| Display Modes | |
| |