Sunday, February 19, 2012

How to get execution progress ?

Does anyone knows how to retrieve execution progress from ssis package, that was
executed programatically.
What I am trying to do, is to launch ssis package on server
and send the progress ("percent complete") to some remote client in order to display it
in progress bar.
I want that ,while ssis package executes, it will raise some event every time the progress changes.

Implement an IDTSEvents interface and pass it to the Execute method.

This Books Online page has more details:

http://technet.microsoft.com/en-us/library/ms135967.aspx

|||I've tried to do that, but without any success.

namespace SSIS_EXEC_SERVER
{
class ExecuteSSIS : IDTSEvents, IHandler
public ExecuteSSIS(I)
{
MyRemotableObjects.Cache.Attach(this);
}

public String fire(string location)
{

Microsoft.SqlServer.Dts.Runtime.Application app = new Microsoft.SqlServer.Dts.Runtime.Application();
Microsoft.SqlServer.Dts.Runtime.Package package = new Microsoft.SqlServer.Dts.Runtime.Package();
package = app.LoadPackage(location, this);
package.DesignEvents = this;
Microsoft.SqlServer.Dts.Runtime.DTSExecResult result= package.Execute();

}


IDTSEvents Members
.
.
.
.

}

When I preform package.Execute() the ExecuteSSIS class does not recieve any events.
There is OnProgress method in IDTSEvents and I asumed that it will be informed by the package (there
is PercentComplete paramether in the method).
But still no success...

No comments:

Post a Comment