Loading SSIS package programmatically in C #

I download the ssis package from my application which works great. However, what I'm trying to work out and fail is that the package takes 1 second to complete (which is great), but the package takes 9 seconds to download.

Works locally in Visual Studio 2015, connecting remotely to an instance of SQL Server 2014.

The package is loaded into a business object after an asynchronous api call from a console application.

Here is 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.

+3


source to share


1 answer


This is fine, the dtsx file is an xml file, and the DtsRuntime library needs to deserialize the file in order to load it as a net net class. There are also some checks that are done when the package is loaded.



0


source







All Articles