在 ssis 中执行包导致超时过期。操作完成前超时时间已过或服务器未响应
Execute package in ssis causes Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding
我有这个代码
var connection = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["SSIS"].ConnectionString);
var integrationServices = new IntegrationServices(connection);
var package = integrationServices
.Catalogs["SSISDB"]
.Folders["MYFOLDER"]
.Projects["MYPROJECT"]
.Packages["MYPACKAGE.dtsx"];
var executionParameters = new System.Collections.ObjectModel.Collection<Microsoft.SqlServer.Management.IntegrationServices.PackageInfo.ExecutionValueParameterSet>();
var executionParameter = new Microsoft.SqlServer.Management.IntegrationServices.PackageInfo.ExecutionValueParameterSet();
executionParameter.ObjectType = 50;
executionParameter.ParameterName = "SYNCHRONIZED";
executionParameter.ParameterValue = 1;
executionParameters.Add(executionParameter);
long executionIdentifier = package.Execute(true, null, executionParameters);
我一调用package.Execute,它就会导致超时错误。操作完成前超时时间已过或服务器未响应
我已经调整了超时 here 但错误存在。
如果我去掉参数executionParameter.ParameterName = "SYNCHRONIZED",
问题被删除。但我想调用同步执行。
知道如何解决这个问题吗?谢谢
执行包时似乎有 30 秒超时,您无法覆盖。您可能需要通过异步执行包然后等待它完成来克服此限制。见下文
ExecutionOperation operation = ssisServer.Catalogs["SSISDB"].Executions[executionIdentifier];
while (!operation.Completed))
{
operation.Refresh();
// Wait before refreshing again
System.Threading.Thread.Sleep(500);
}
有关详细信息,请参阅 this link
我有这个代码
var connection = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["SSIS"].ConnectionString);
var integrationServices = new IntegrationServices(connection);
var package = integrationServices
.Catalogs["SSISDB"]
.Folders["MYFOLDER"]
.Projects["MYPROJECT"]
.Packages["MYPACKAGE.dtsx"];
var executionParameters = new System.Collections.ObjectModel.Collection<Microsoft.SqlServer.Management.IntegrationServices.PackageInfo.ExecutionValueParameterSet>();
var executionParameter = new Microsoft.SqlServer.Management.IntegrationServices.PackageInfo.ExecutionValueParameterSet();
executionParameter.ObjectType = 50;
executionParameter.ParameterName = "SYNCHRONIZED";
executionParameter.ParameterValue = 1;
executionParameters.Add(executionParameter);
long executionIdentifier = package.Execute(true, null, executionParameters);
我一调用package.Execute,它就会导致超时错误。操作完成前超时时间已过或服务器未响应
我已经调整了超时 here 但错误存在。
如果我去掉参数executionParameter.ParameterName = "SYNCHRONIZED", 问题被删除。但我想调用同步执行。
知道如何解决这个问题吗?谢谢
执行包时似乎有 30 秒超时,您无法覆盖。您可能需要通过异步执行包然后等待它完成来克服此限制。见下文
ExecutionOperation operation = ssisServer.Catalogs["SSISDB"].Executions[executionIdentifier];
while (!operation.Completed))
{
operation.Refresh();
// Wait before refreshing again
System.Threading.Thread.Sleep(500);
}
有关详细信息,请参阅 this link