Wednesday, March 7, 2012

execute sql server agent job task - Job immediately returns success... However agent job is

when I run a package from a command window using dtexec, the job immediately says success.

DTExec: The package execution returned DTSER_SUCCESS (0).

Started:3:37:41 PM

Finished: 3:37:43 PM

Elapsed:2.719 seconds

However the Job is still in th agent and the status is executing. The implications of this are not good. Is this how the sql server agent job task is supposed to work by design.

Thanks,

Larry

Just to get this right. Your SSIS package starts a SQL Agent job. You are executing the package and it completes immediately. This is by design. There is no synchronous hook into the SQL Agent Job Scheduling, you can implement a waiting loop to check the job has completed but that is quite messy.

No comments:

Post a Comment