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

Thread local storage failure when executing a SSIS package from C# code

$
0
0

Hi everyone,

We have made an application on .NET 3.5 using C# to run some SSIS (*.dstx package) we have built.

We are working with:

 

  • Intel Xeon Processor E5620
  • 12 GB Ram
  • SQL Server 2008
  • Windows Server 2008 R2 standard (64x)

 

There is a thread for SSIS package. This packages are quite heavy, so we have limited from code to 5 as the max number that can be run at the same time.

We are using this code:

 

//This saves the start log
new TaskLog(IdTask, TaskLog.LogType.TaskAcction, DateTime.Now, " Executing SSIS Package : " + packageName).Save();
Package pkg = app.LoadPackage(this.PackagePath, eventListener);
DTSExecResult pkgResults = pkg.Execute(null, null, eventListener, null, null);
// this saves the end log
new TaskLog(IdTask, TaskLog.LogType.TaskAcction, DateTime.Now, " SSIS Package Executed : " + packageName + ". Result : " + pkgResults.ToString()).Save();

 

After few days of running (our app runs like a windows service):

 

SOURCE: Microsoft.SqlServer.DTSRuntimeWrap

MESSAGE: Thread local storage failure (Exception from HRESULT: 0x80004006 (CO_E_INIT_TLS))

TARGETSITE: Microsoft.SqlServer.Dts.Runtime.DTSExecResult Execute(Microsoft.SqlServer.Dts.Runtime.Connections, Microsoft.SqlServer.Dts.Runtime.Variables, Microsoft.SqlServer.Dts.Runtime.IDTSEvents, Microsoft.SqlServer.Dts.Runtime.IDTSLogging, System.Object)

STACKTRACE:    at Microsoft.SqlServer.Dts.Runtime.DtsContainer.Execute(Connections connections, Variables variables, IDTSEvents events, IDTSLogging log, Object transaction) at BizLayer.ExecutionStgys.SSISExecutor.Execute() in SSISExecutor.cs:line 126

 

Line 126 is :

DTSExecResult pkgResults = pkg.Execute(null, null, eventListener, null, null);

The main problem is that the application can't run any other package until we restart the windows service.

Do you have any clue of what's going on in here? We have tried some workarounds and nothing is working.

Thanks in advance,

Alan.-

 

 

 

 


Viewing all articles
Browse latest Browse all 24688

Trending Articles



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