Groups | Blog | Home
all groups > sql server dts > january 2006 >

sql server dts : Scheduled DTS Task fails to complete


Bodo
1/31/2006 3:29:27 AM
Hi ,
my DTS package has two tasks:
DTSTask_DTSActiveScriptTask_1
DTSTask_DTSSendMailTask_1

I add the following code to the Active X Task:
Function Main()
Dim accAppImport
Dim appPath, appDB , frmStart

appPath = DTSGlobalVariables("AppPath").Value
appDB = DTSGlobalVariables("AppDB").Value

Set accAppImport = CreateObject ("Access.Application.10")

accAppImport.DoCmd.SetWarnings(False)

accAppImport.OpenCurrentDatabase appPath & appDB , False

fstart = accAppImport.Forms("Start")
accAppImport.DoCmd.OpenForm "Start"
accAppImport.Forms("Start").BefehlStart_Click
accAppImport.Quit

Set accAppImport = Nothing


Main = DTSTaskExecResult_Success
End Function

When I execute this task in DTS Design mode it runs fine.
However when the scheduled DTS task runs it doesnot terminate.
I don't get any error messages while the job runs. It seems the job runs
infinitely .

Any ideas how to troubleshoot?

Allan Mitchell
1/31/2006 3:42:24 AM
Hello Bodo,

Are you sure it is not waiting for user interaction or the package has hung?

Executing a package as a job and interactively are very very different.


http://support.microsoft.com/?kbid=269074



Allan

[quoted text, click to view]

Bodo
1/31/2006 11:55:30 PM
Hi Allan,
thanks for your reply.
the scheduled task could not completed due to a broken reference in the
access database. That causes the application to hung on the target machine
when it was run by SQLServer Agent.
Now that I removed the reference from the database, the job completes
successfully.
Bodo


[quoted text, click to view]
AddThis Social Bookmark Button