latest Post

SSIS Script Component Error - "Failed the post execute phase and returned error code 0xC0010009. COM Exception."

Yesterday I was working on an SSIS package which contained multiple "Script Components" which was doing some basic event logic of taking an input parameter and storing the output into a SQL database using the SQLConnection method.

The transform ran perfectly inside Visual Studio and SQL Server Data Tools however, the package had to be ran nightly so it was deployed to a server and scheduled to run using SQL Server Agent. Once it was deployed to the server and manually ran  I found the transform failed with the following error message.

"Failed the post execute phase and returned error code 0xC0010009. COM Exception."

I tried all most everything to fix the issue, rebuilding and deploying and commenting out each line until it worked however, I got to the point where everything was commented out and it still wouldn't run on the server. I had a look in the various community forums but there wasn't many users who were reporting similar issues.

Finally I decided to delete the script component all together and manually re-add the code back in. This time when I deployed to the server the package ran successfully

Now all I can think of is I had copied the script component and modified it slightly as I wanted to do something similar to my first script component, so I wonder if it didn't like the copy and paste?.  Although if that was the case I would of expected it not to run in BIDS either. 

Unfortunately I don't have an answer to why it didn't run in SQL Server Agent the first time but hopefully this might help someone out so don't spend ages looking into this just add another script component, re-add the code and move on.
Recommended Posts × +

0 comments:

Post a Comment