Quantcast
Channel: SQL Server Integration Services forum
Viewing all articles
Browse latest Browse all 24688

Timeout after 30 seconds when executing package via .NET

$
0
0

Hi,

I'm using SSIS 2012 with SQL version: 11.0.5537.0 SP2 Enterprise Edition: Core-based Licensing (64-bit).

I'm getting timeout errors when it takes more than 30 seconds to execute an SSIS package via .NET. In my connection string I set the time out at 90 seconds but without success (I see its value when debug, but with no effect):
Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.

// Connection to the database server where the packages are located
using (SqlConnection ssisConnection = new SqlConnection("Data Source=.;Initial Catalog=master;Integrated Security=SSPI;Connection Timeout=90")
{
	try
	{
		// SSIS server object with connection
		IntegrationServices ssisServer = new IntegrationServices(ssisConnection);

		// The reference to the package which you want to execute
		PackageInfo ssisPackage = ssisServer.Catalogs["SSISDB"].Folders["SomeFolder"].Projects["SomeProject"].Packages["Package.dtsx"];

		// Add execution parameter to override the default asynchronized execution. If you leave this out the package is executed asynchronized
		Collection<PackageInfo.ExecutionValueParameterSet> executionParameter = new Collection<PackageInfo.ExecutionValueParameterSet>();
		executionParameter.Add(new PackageInfo.ExecutionValueParameterSet { ObjectType = 50, ParameterName = "SYNCHRONIZED", ParameterValue = 1 });

		// Add a package parameter
		executionParameter.Add(new PackageInfo.ExecutionValueParameterSet { ObjectType = 30, ParameterName = "myStringParam", ParameterValue = "somevalue" });

		// Get the identifier of the execution to get the log
		long executionIdentifier = ssisPackage.Execute(false, null, executionParameter);
	}
	catch (exception ex)
	{
	    // Log code for exceptions *remove from this example*
	}
}
Where can I change this 30 second limit? (I don't get the time out when executing manually via SSIS Catalog)




Viewing all articles
Browse latest Browse all 24688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>