dbTalk Databases Forums  

DTS won't run as scheduled job (DTSStepExecStat_Completed)

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


Discuss DTS won't run as scheduled job (DTSStepExecStat_Completed) in the microsoft.public.sqlserver.dts forum.



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

Default DTS won't run as scheduled job (DTSStepExecStat_Completed) - 10-20-2005 , 04:51 PM






I am trying to use ActiveX to skip some steps if a file is not present.
The code works fine in DTS Designer, but fails when I run it as a
scheduled job.

I get this error from the job history.
DTSRun OnStart: DTSStep_DTSActiveScriptTask_3 DTSRun OnFinish:
DTSStep_DTSActiveScriptTask_3 DTSRun: Package execution complete.
Process Exit Code 1. The step failed.


Code snippet from "DTSStep_DTSActiveScriptTask_3"

If x = y then
Do stuff
Else
oPkg.Steps("DTSStep_DTSDataPumpTask_3").DisableSte p =True
oPkg.Steps("DTSStep_DTSExecuteSQLTask_15").Executi onStatus =
DTSStepExecStat_Completed

Can anyone offer some advice?


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

Default Re: DTS won't run as scheduled job (DTSStepExecStat_Completed) - 10-20-2005 , 05:49 PM






Hello Dave,


Can you have the package do the logging as I often find the job step logging
rather short.?

In 90% of cases where interactively things work and as a scheduled job they
fail the problem can be found here.

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


Allan



Quote:
I am trying to use ActiveX to skip some steps if a file is not
present.
The code works fine in DTS Designer, but fails when I run it as a
scheduled job.
I get this error from the job history.
DTSRun OnStart: DTSStep_DTSActiveScriptTask_3 DTSRun OnFinish:
DTSStep_DTSActiveScriptTask_3 DTSRun: Package execution complete.
Process Exit Code 1. The step failed.
Code snippet from "DTSStep_DTSActiveScriptTask_3"

If x = y then
Do stuff
Else
oPkg.Steps("DTSStep_DTSDataPumpTask_3").DisableSte p =True
oPkg.Steps("DTSStep_DTSExecuteSQLTask_15").Executi onStatus =
DTSStepExecStat_Completed

Can anyone offer some advice?




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

Default Re: DTS won't run as scheduled job (DTSStepExecStat_Completed) - 10-21-2005 , 10:01 AM



I dont think it is security. I run the job as sa and it runs fine.

I am trying to skip about 5 steps (Active X and SQL) if a file is not
present. This is the line of code that fails to run as a scheduled
job.
oPkg.Steps("DTSStep_DTSExecuteSQLTask_15").Executi onStatus =
DTSStepExecStat_Completed

I have no issues when I try and disable my datapump. The problem is
when I try and jump forward a few steps by setting SQLTask_15 to
completed. It works in DTS Designer.

Any thoughts?


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

Default Re: DTS won't run as scheduled job (DTSStepExecStat_Completed) - 10-22-2005 , 05:08 AM



Hello Dave,

So who owns the job currently?
Member of the sysadmin role?

If they are then what is the SQL Server Agent Service Account?

If they are not then what is the proxy account.

You said you ran the job as sa and it workd then this would suggest that
the job ran as the service account and was fine. This would also suggest
that the current owner is not being translated to the same service account
and is using the proxy account.


Could it be this?


Allan


Quote:
I dont think it is security. I run the job as sa and it runs fine.

I am trying to skip about 5 steps (Active X and SQL) if a file is not
present. This is the line of code that fails to run as a scheduled
job.
oPkg.Steps("DTSStep_DTSExecuteSQLTask_15").Executi onStatus =
DTSStepExecStat_Completed
I have no issues when I try and disable my datapump. The problem is
when I try and jump forward a few steps by setting SQLTask_15 to
completed. It works in DTS Designer.

Any thoughts?




Reply With Quote
  #5  
Old   
Dave
 
Posts: n/a

Default Re: DTS won't run as scheduled job (DTSStepExecStat_Completed) - 10-24-2005 , 10:23 AM



MSSQLSERVER and SQLSERVERAGENT services both run under the same
account. The account is a domain administrator and a member of the
local machines administrators group.

My account is also a member of the local machines Administrators group
(though it is on a different domain).

I am starting to think this is a bug with SQL Server. I just created a
fake package on a different server that used a similar line of ActiveX
code and I saw the same behavior.

It will run fine in DTS Designer but will not run as a scheduled job.

Below are the last couple lines from the job history.

DTSRun OnStart: DTSStep_DTSExecuteSQLTask_17 DTSRun OnFinish:
DTSStep_DTSExecuteSQLTask_17 DTSRun: Package execution complete.
Process Exit Code 1. The step failed.


Reply With Quote
  #6  
Old   
Dave
 
Posts: n/a

Default Re: DTS won't run as scheduled job (DTSStepExecStat_Completed) - 10-24-2005 , 10:24 AM



btw... just to clarify. the job will not run successfully under any
account, including sa.


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.