While creating an SSIS Package in SQL Server 2008 R2 I ran into a problem with an “architecture mismatch between the driver and the application” when trying to use a DSN as a new connection.
It turns out this is the result of the differences between 32-bit and 64-bit drivers. When creating data source names using the ODBC Data Source Administrator (Control Panel > Administrative Tools > Data Sources (ODBC)). Apparently when you run this tool on a Windows 2008 R2 server (64 bit) you are running the 64 bit version of this tool which only recognizes 64 bit drivers. SSIS is expecting 32 bit DSNs using 32 bit drivers (I think – this is still sinking in).
The fix to this is to create 32 bit DSNs. To do this you need to run the ODBC Data Source Administrator located here:
One caveat is that you cannot create DSNs with the same name – e.g. “MyReportDB” – in both the 32 bit and 64 bit Data Source Administrator applications. I named mine “MyReportDB_32” and “MyReportDB_64”. I also created shortcuts to both Data Source Administrator applications changing their names to reflect the 32 or 64 bit version.
The 64 bit version of the ODBC Data Source Administrator is located here:
The following images show the difference of the Drivers tab in the Data Source Administrator applications. This is the 64 bit version of the tool:
And this is the 32-bit version – notice there are alot more drivers:
Hopefully this will save some time for others!
The complete error I was encountering was:
Test connection failed because of an error in initializing provider. ERROR [IM014] [Microsoft][ODBC Driver Manager] The specified DSN contains an architecture mismatch between the Drive and Application
Many thanks go John DaCosta for his helpful explanation on his blog!