Thursday, October 23, 2008

SSIS error using mysql and ado

I just ran into an interesting problem in SSIS while using the mysql 5.1.6 ADO.net connector. I had a package that connected to mysql using ado.net ran a command, then a couple of other sql tasks, and finally came back and ran another mysql ado.net command. When working in Visual studio I had no problems all green, but when I went to schedule it out through a job it failed, with the following message.

Executed as user: fakeuser. Microsoft (R) SQL Server Execute Package Utility Version 9.00.3042.00 for 64-bit Copyright (C) Microsoft Corp 1984-2005. All rights reserved. Started: 11:23:26 AM Error: 2008-10-23 11:23:27.12 Code: 0xC001000E Source: MYSQL SSIS Description: The connection "Mail Connection" is not found. This error is thrown by Connections collection when the specific connection element is not found. End Error DTExec: The package execution returned DTSER_SUCCESS (0). Started: 11:23:26 AM Finished: 11:23:27 AM Elapsed: 0.937 seconds. The return value was unknown. The process exit code was -532459699. The step failed.

The mail connection in the message is a red herring. The issue seems to be a memory allocation error by SSIS. The problem was each task opened a second instance of the mysql ado.net frame work and blew it up. Why this only happened when called externally and not within visual studio I don’t have the answer.

The work around was in the properties of the mysql ado.net connection I set RetainSameConnection to true, so that a second connection would not be spawned and step on the first

No comments: