Bandwidth Monitor
EXCEPTION_ACCESS_VIOLATION during package execution
By Darren Green
  • Run-Time Error -2177221499 (80040005) Provider generated code execution exception: EXCEPTION_ACCESS_VIOLATION
  • This error normally involves a task written in Visual Basic, such as the Microsoft supplied OLAP Processing Task. Visual Basic does not support free threading, so to prevent this error, any such tasks must execute on the main package thread. To check this, right-click the task, select Workflow, then Workflow Properties. On the Options tab, the "Execute on main package thread" must be checked. The DTS Designer will normally set this correctly for the non-free threaded task, however any other tasks that interact with it must also execute on the main package thread:

    • When using an ActiveX Script Task or Dynamic Properties Task to update a property of the OLAP Processing task, both tasks must execute on the main thread.
    • If using the Execute Package Task, and the child package contains an OLAP Processing Task, the Execute Package Task must also be set to execute on the main thread.

    Other components written in Visual Basic can also fall foul of the same threading issues. ActiveX Scripts that invoke components can sometimes fail or never end. Setting the "Execute on main package thread" will prevent this as well.