dbTalk Databases Forums  

dts package sometimes stops executing

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


Discuss dts package sometimes stops executing in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
ilske
 
Posts: n/a

Default dts package sometimes stops executing - 08-07-2006 , 06:45 AM






I got the following sequence of tasks in my dts package :

.... -> Script Task
-SUCCESS-> Task 1 -> Task 2 -> Task 3 -> ...
-FAILURE-> Task 3

So, if the script task succeeds, tasks 1, 2 and 3 are executed. If it
fails, only task 3 is executed.
The package is executed from within an other parent package. When
starting the parent package, most of the time everything works fine,
but sometimes the child package stops at step "Script task" for no
reason. When executing the parent package again afterwards, everything
words fine again !

The Script Task looks like this :

Function Main()

Dim opkg, oConstraint, oConstraints
Const DTSPath_True_Last_Step = "<Task 2>"
Const Current_Step = "<Script Task>"

Set fso = CreateObject("Scripting.FileSystemObject")
Set oPkg = DTSGlobalVariables.Parent
Set oConstraints = oPkg.Steps("<Task 3>").PrecedenceConstraints

If fso.FileExists(DTSGlobalVariables("filename").Valu e) Then
Set file1 =fso.getfile(DTSGlobalVariables("filename").Value)
If (file1.Size) > 0 Then
oPkg.Steps(Current_Step).DisableStep = True
Set oConstraint = GetConstraint(oConstraints, DTSPath_True_Last_Step)
oConstraint.PrecedenceBasis = DTSStepPrecedenceBasis_ExecResult
oConstraint.Value = DTSStepExecResult_Success
Set oConstraint = GetConstraint(oConstraints, Current_Step)
oConstraint.PrecedenceBasis = DTSStepPrecedenceBasis_ExecStatus
oConstraint.Value = DTSStepExecStat_Inactive
oPkg.Steps(Current_Step).ExecutionStatus = DTSStepExecStat_Inactive
Main =DTSTaskExecResult_Success
Exit Function
End If
End If

Set oConstraint = GetConstraint(oConstraints, Current_Step)
oConstraint.PrecedenceBasis = DTSStepPrecedenceBasis_ExecResult
oConstraint.Value = DTSStepExecResult_Failure
Set oConstraint = GetConstraint(oConstraints, DTSPath_True_Last_Step)
oConstraint.PrecedenceBasis = DTSStepPrecedenceBasis_ExecStatus
oConstraint.Value = DTSStepExecStat_Inactive
oPkg.Steps(DTSPath_True_Last_Step).ExecutionStatus =
DTSStepExecStat_Inactive
Main = DTSTaskExecResult_Failure

End Function

Function GetConstraint(oConstraints, sStepName)
' Get Constraint by Source Step Name
Dim oConstraint
For Each oConstraint In oConstraints
If oConstraint.StepName = sStepName Then
Set GetConstraint = oConstraint
Exit For
End If
Next
End Function

When executing the package, the file exists, so the task should report
success.

Can anyone please help me ?
Thanks in advance !


Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: dts package sometimes stops executing - 08-07-2006 , 12:43 PM






Without an error message it is difficult (Does it error or just stop?)

Anyway the first thing I would be trying to set everything to execute on the
main package thread. (Workflow Properties)

--


Allan Mitchell
Konesans Ltd
T +44 7966 476 572
F +44 2071 008 479
http://www.konesans.com



"ilske" <ilse.haak (AT) cevi (DOT) be> wrote

Quote:
I got the following sequence of tasks in my dts package :

... -> Script Task
-SUCCESS-> Task 1 -> Task 2 -> Task 3 -> ...
-FAILURE-> Task 3

So, if the script task succeeds, tasks 1, 2 and 3 are executed. If it
fails, only task 3 is executed.
The package is executed from within an other parent package. When
starting the parent package, most of the time everything works fine,
but sometimes the child package stops at step "Script task" for no
reason. When executing the parent package again afterwards, everything
words fine again !

The Script Task looks like this :

Function Main()

Dim opkg, oConstraint, oConstraints
Const DTSPath_True_Last_Step = "<Task 2>"
Const Current_Step = "<Script Task>"

Set fso = CreateObject("Scripting.FileSystemObject")
Set oPkg = DTSGlobalVariables.Parent
Set oConstraints = oPkg.Steps("<Task 3>").PrecedenceConstraints

If fso.FileExists(DTSGlobalVariables("filename").Valu e) Then
Set file1 =fso.getfile(DTSGlobalVariables("filename").Value)
If (file1.Size) > 0 Then
oPkg.Steps(Current_Step).DisableStep = True
Set oConstraint = GetConstraint(oConstraints, DTSPath_True_Last_Step)
oConstraint.PrecedenceBasis = DTSStepPrecedenceBasis_ExecResult
oConstraint.Value = DTSStepExecResult_Success
Set oConstraint = GetConstraint(oConstraints, Current_Step)
oConstraint.PrecedenceBasis = DTSStepPrecedenceBasis_ExecStatus
oConstraint.Value = DTSStepExecStat_Inactive
oPkg.Steps(Current_Step).ExecutionStatus = DTSStepExecStat_Inactive
Main =DTSTaskExecResult_Success
Exit Function
End If
End If

Set oConstraint = GetConstraint(oConstraints, Current_Step)
oConstraint.PrecedenceBasis = DTSStepPrecedenceBasis_ExecResult
oConstraint.Value = DTSStepExecResult_Failure
Set oConstraint = GetConstraint(oConstraints, DTSPath_True_Last_Step)
oConstraint.PrecedenceBasis = DTSStepPrecedenceBasis_ExecStatus
oConstraint.Value = DTSStepExecStat_Inactive
oPkg.Steps(DTSPath_True_Last_Step).ExecutionStatus =
DTSStepExecStat_Inactive
Main = DTSTaskExecResult_Failure

End Function

Function GetConstraint(oConstraints, sStepName)
' Get Constraint by Source Step Name
Dim oConstraint
For Each oConstraint In oConstraints
If oConstraint.StepName = sStepName Then
Set GetConstraint = oConstraint
Exit For
End If
Next
End Function

When executing the package, the file exists, so the task should report
success.

Can anyone please help me ?
Thanks in advance !




Reply With Quote
  #3  
Old   
ilske
 
Posts: n/a

Default Re: dts package sometimes stops executing - 08-08-2006 , 08:38 AM



It gets even worse now :

I have set indicator 'execute on main package thread' for all steps in
the package and in the parent package. When I execute the parent
package, the package stops after Task 2 (see my example), and the
parent package gives error message "the executable program that this
service is configured to run in does not implement the service". When
executing the package itself, it also stops after Task 2, without
giving any error message. In the log is mentioned that the package
execution succeeded.


Allan Mitchell schreef:

Quote:
Without an error message it is difficult (Does it error or just stop?)

Anyway the first thing I would be trying to set everything to execute on the
main package thread. (Workflow Properties)

--


Allan Mitchell
Konesans Ltd
T +44 7966 476 572
F +44 2071 008 479
http://www.konesans.com



"ilske" <ilse.haak (AT) cevi (DOT) be> wrote in message
news:1154951115.873664.137900 (AT) i3g2000cwc (DOT) googlegroups.com...
I got the following sequence of tasks in my dts package :

... -> Script Task
-SUCCESS-> Task 1 -> Task 2 -> Task 3 -> ...
-FAILURE-> Task 3

So, if the script task succeeds, tasks 1, 2 and 3 are executed. If it
fails, only task 3 is executed.
The package is executed from within an other parent package. When
starting the parent package, most of the time everything works fine,
but sometimes the child package stops at step "Script task" for no
reason. When executing the parent package again afterwards, everything
words fine again !

The Script Task looks like this :

Function Main()

Dim opkg, oConstraint, oConstraints
Const DTSPath_True_Last_Step = "<Task 2>"
Const Current_Step = "<Script Task>"

Set fso = CreateObject("Scripting.FileSystemObject")
Set oPkg = DTSGlobalVariables.Parent
Set oConstraints = oPkg.Steps("<Task 3>").PrecedenceConstraints

If fso.FileExists(DTSGlobalVariables("filename").Valu e) Then
Set file1 =fso.getfile(DTSGlobalVariables("filename").Value)
If (file1.Size) > 0 Then
oPkg.Steps(Current_Step).DisableStep = True
Set oConstraint = GetConstraint(oConstraints, DTSPath_True_Last_Step)
oConstraint.PrecedenceBasis = DTSStepPrecedenceBasis_ExecResult
oConstraint.Value = DTSStepExecResult_Success
Set oConstraint = GetConstraint(oConstraints, Current_Step)
oConstraint.PrecedenceBasis = DTSStepPrecedenceBasis_ExecStatus
oConstraint.Value = DTSStepExecStat_Inactive
oPkg.Steps(Current_Step).ExecutionStatus = DTSStepExecStat_Inactive
Main =DTSTaskExecResult_Success
Exit Function
End If
End If

Set oConstraint = GetConstraint(oConstraints, Current_Step)
oConstraint.PrecedenceBasis = DTSStepPrecedenceBasis_ExecResult
oConstraint.Value = DTSStepExecResult_Failure
Set oConstraint = GetConstraint(oConstraints, DTSPath_True_Last_Step)
oConstraint.PrecedenceBasis = DTSStepPrecedenceBasis_ExecStatus
oConstraint.Value = DTSStepExecStat_Inactive
oPkg.Steps(DTSPath_True_Last_Step).ExecutionStatus =
DTSStepExecStat_Inactive
Main = DTSTaskExecResult_Failure

End Function

Function GetConstraint(oConstraints, sStepName)
' Get Constraint by Source Step Name
Dim oConstraint
For Each oConstraint In oConstraints
If oConstraint.StepName = sStepName Then
Set GetConstraint = oConstraint
Exit For
End If
Next
End Function

When executing the package, the file exists, so the task should report
success.

Can anyone please help me ?
Thanks in advance !



Reply With Quote
  #4  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: dts package sometimes stops executing - 08-08-2006 , 01:14 PM



Do any of these help

http://www.google.com/search?hl=en&l...the+service%22

--


Allan Mitchell
Konesans Ltd
T +44 7966 476 572
F +44 2071 008 479
http://www.konesans.com



"ilske" <ilse.haak (AT) cevi (DOT) be> wrote

Quote:
It gets even worse now :

I have set indicator 'execute on main package thread' for all steps in
the package and in the parent package. When I execute the parent
package, the package stops after Task 2 (see my example), and the
parent package gives error message "the executable program that this
service is configured to run in does not implement the service". When
executing the package itself, it also stops after Task 2, without
giving any error message. In the log is mentioned that the package
execution succeeded.


Allan Mitchell schreef:

Without an error message it is difficult (Does it error or just stop?)

Anyway the first thing I would be trying to set everything to execute on
the
main package thread. (Workflow Properties)

--


Allan Mitchell
Konesans Ltd
T +44 7966 476 572
F +44 2071 008 479
http://www.konesans.com



"ilske" <ilse.haak (AT) cevi (DOT) be> wrote in message
news:1154951115.873664.137900 (AT) i3g2000cwc (DOT) googlegroups.com...
I got the following sequence of tasks in my dts package :

... -> Script Task
-SUCCESS-> Task 1 -> Task 2 -> Task 3 -> ...
-FAILURE-> Task 3

So, if the script task succeeds, tasks 1, 2 and 3 are executed. If it
fails, only task 3 is executed.
The package is executed from within an other parent package. When
starting the parent package, most of the time everything works fine,
but sometimes the child package stops at step "Script task" for no
reason. When executing the parent package again afterwards, everything
words fine again !

The Script Task looks like this :

Function Main()

Dim opkg, oConstraint, oConstraints
Const DTSPath_True_Last_Step = "<Task 2>"
Const Current_Step = "<Script Task>"

Set fso = CreateObject("Scripting.FileSystemObject")
Set oPkg = DTSGlobalVariables.Parent
Set oConstraints = oPkg.Steps("<Task 3>").PrecedenceConstraints

If fso.FileExists(DTSGlobalVariables("filename").Valu e) Then
Set file1 =fso.getfile(DTSGlobalVariables("filename").Value)
If (file1.Size) > 0 Then
oPkg.Steps(Current_Step).DisableStep = True
Set oConstraint = GetConstraint(oConstraints, DTSPath_True_Last_Step)
oConstraint.PrecedenceBasis = DTSStepPrecedenceBasis_ExecResult
oConstraint.Value = DTSStepExecResult_Success
Set oConstraint = GetConstraint(oConstraints, Current_Step)
oConstraint.PrecedenceBasis = DTSStepPrecedenceBasis_ExecStatus
oConstraint.Value = DTSStepExecStat_Inactive
oPkg.Steps(Current_Step).ExecutionStatus = DTSStepExecStat_Inactive
Main =DTSTaskExecResult_Success
Exit Function
End If
End If

Set oConstraint = GetConstraint(oConstraints, Current_Step)
oConstraint.PrecedenceBasis = DTSStepPrecedenceBasis_ExecResult
oConstraint.Value = DTSStepExecResult_Failure
Set oConstraint = GetConstraint(oConstraints, DTSPath_True_Last_Step)
oConstraint.PrecedenceBasis = DTSStepPrecedenceBasis_ExecStatus
oConstraint.Value = DTSStepExecStat_Inactive
oPkg.Steps(DTSPath_True_Last_Step).ExecutionStatus =
DTSStepExecStat_Inactive
Main = DTSTaskExecResult_Failure

End Function

Function GetConstraint(oConstraints, sStepName)
' Get Constraint by Source Step Name
Dim oConstraint
For Each oConstraint In oConstraints
If oConstraint.StepName = sStepName Then
Set GetConstraint = oConstraint
Exit For
End If
Next
End Function

When executing the package, the file exists, so the task should report
success.

Can anyone please help me ?
Thanks in advance !





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.