Tuesday, March 20, 2012

Current executing task

Hi everyone

I'm trying to write a monitoring application for SSIS packages deployed on my machine. I know I can look at running packages via the DtsRuntime.Application object's GetRunningPackages method. Does anyone know if there is any way one can view tasks in that package that are currently being executed?

Cheers

Sachin

Wow! Brilliant! I was hoping for at least one reply... I guess I have to question whether this is possible or not. :)|||

You can, but it comes down to implementing the IDTSEvents interface, and/or overriding the packageEvents class.

You will then override the the function's OnPreExecute/OnPostExecute in your execution + monitoring application.

This "get current running tasks" would be much eaiser if there were not in bug in Application.GetRunningPackages() in which in InstanceId (the unique job execution identifier) does not match the execution id in the logs. If it did, you could call get running Packages, and then use logging to determine what was running and be close to on the money.

To me, the bug is analogous to logging the SQL Server spid in SQL profiler, but having it never match "select spid from master..sysprocesses".

|||

sachin.rao wrote:

Wow! Brilliant! I was hoping for at least one reply... I guess I have to question whether this is possible or not. :)

You posted at 17:09 and then sent this reply at 09:20 on the next working day. GIve people a chance! Also, nobody is required to answer you know.

As jaegd said, you can derive this by looking at the OnPreExecute/OnPostExecute events.

-Jamie

|||

Ok. Thanks jaegd.

Jamie - I realize that nobody has to answer. No offense intended. It was just that 50-odd people had viewed the topic and there hadn't been a response, so I was just thinking out aloud. That's all.

No comments:

Post a Comment