Loading SSIS Package Programmatically in C#

Viewed 596

I'm loading a ssis package from my application which works fine. However, what I'm trying to work out and failing miserably is that the package executes in 1 second (which is great) but the loading of the package takes 9 seconds.

Working locally in visual studio 2015 connecting remotely to a SQL Server 2014 instance.

The package is being loaded in a business object behind an async web api call from a console application.

Heres the code (standard stuff)...

Application application = new Application();
DTSExecResult result;
DTSPackageEventListener eventListener = new DTSPackageEventListener();

packageLocation = request.packageLocation;

//using (Package package = application.LoadPackage(packageLocation, eventListener)) // 9 seconds to load
using (Package package = application.LoadFromDtsServer(@"File System\<PACKAGENAME>", @"<SERVERNAME>", eventListener)) // 9 seconds to load
{
.
.
.

Does anyone have any tips? Any help/guidance would be much appreciated.

Simon.

1 Answers
Related