Search code examples
xmlssisscript-tasktargetinvocationexception

"Exception has been thrown by target of invocation" while loading XML data into a variable


I have a SSIS task which reads XML files from a folder. It reads each XML file into a variable and then loads that data into a SQL server table (bulk column). This process works fine in the Local and Dev environments, but it gives me an error when executing in stage environment:

Exception has been thrown by the target of an invocation.

The size of the XML file is 200 MB and above is the error that I face in stage environment.

I attached an image of the execution log:

ExecutionLog

How can I fix this?


Solution

  • Issue got resolved. The package was throwing out of memory exception when executed in 64 bit mode and was working fine in 32 bit mode (not sure why the Exception was thrown in 64 bit mode though).

    So, created a task in task scheduler to run the package using DTexec.exe (x86) and it executed successfully.