SSIS: ODBC Data Source is not showing up in the Connection

The problem happens if you use the 32 bit ODBC tools on 64 bit OS or use 64 bit ODBC in 32 bit SSIS.

So opening the correct version of ODBC tool solve the problem.

A 64-bit version of the Microsoft Windows operating system includes the following versions of the Microsoft Open Database Connectivity (ODBC) Data Source Administrator tool (Odbcad32.exe):

  • The 32-bit version of the Odbcad32.exe file is located in the %systemdrive%\Windows\SysWoW64 folder.
  • The 64-bit version of the Odbcad32.exe file is located in the %systemdrive%\Windows\System32 folder.

The Odbcad32.exe file displays the following types of data source names (DSNs):

  • System DSNs
  • User DSNs

Symptom 1

The 32-bit version of the ODBC Administrator tool displays 32-bit system DSNs, 32-bit user DSNs, and 64-bit user DSNs. The 64-bit version of the ODBC Administrator tool displays 64-bit system DSNs, 32-bit user DSNs, and 64-bit user DSNs.

Symptom 2

The SQLDataSources function returns all versions of user DSNs, regardless of the architecture of the application. TheSQLDataSources function that is called in a 32-bit application returns only system DSNs for 32-bit drivers but returns user DSNs for both 32-bit drivers and 64-bit drivers. Similarly, the SQLDataSources function that is called in a 64-bit application returns only system DSNs for 64-bit drivers but returns user DSNs for both 32-bit drivers and 64-bit drivers. Therefore, if the application makes a connection by using a user DSN that is returned from the SQLDataSourcesfunction, you may receive the following error message:

Data source name not found and no default driver specified

For example, consider the following scenario. You create a user DSN for the 32-bit driver “Microsoft Access Driver (*.mdb).” This driver does not have a corresponding 64-bit version. The SQLDataSources function that is called in a 64-bit application returns this 32-bit user DSN. However, if you make a connection through this 32-bit user DSN, you receive the error message that is mentioned earlier in this section.

Cause

The user DSNs are stored under the following registry subkey:

HKEY_CURRENT_USER\Software\ODBC\ODBC.INI

Registry redirection is not enabled for this registry subkey. Therefore, user DSNs are visible in both the 32-bit and 64-bit versions of the ODBC Administrator tool.

Resolution

To maintain backward compatibility, no resolution for this problem is currently available.

Workaround

To work around this problem, use the appropriate version of the ODBC Administrator tool. If you build and then run an application as a 32-bit application on a 64-bit operating system, you must create the ODBC data source by using the ODBC Administrator tool in %windir%\SysWOW64\odbcad32.exe. To indicate the type of DSN, you can add “_32” to the 32-bit user DSNs and “_64” to the 64-bit user DSNs.

More information

The 64-bit ODBC Administrator tool can be invoked from Control Panel to manage user DSNs and system DSNs that are used by 64-bit processes. On a 64-bit operating system, the 32-bit ODBC Administrator tool is used for Windows on Windows 64 (WOW64) processes. You must directly invoke the 32-bit ODBC Administrator tool from the SysWoW64 folder. You can use the 32-bit ODBC Administrator tool to manage user DSNs and system DSNs that are used by WOW64 processes.

System DSNs are stored in the following registry subkey:

HKEY_LOCAL_MACHINE\Software\ODBC\ODBC.INI

Registry redirection is enabled for this registry subkey. Therefore, system DSNs for 32-bit drivers and for 64-bit drivers are separated. The 64-bit ODBC Administrator tool does not display system DSNs that are created by the 32-bit ODBC Administrator tool. Similarly, the 32-bit ODBC Administrator tool does not display system DSNs that are created by the 64-bit ODBC Administrator tool. Also, the 64-bit ODBC Administrator tool does not display system DSNs that use 32-bit drivers. Similarly, the 32-bit ODBC Administrator tool does not display system DSNs that use 64-bit drivers.

User DSNs are stored in the following registry subkey:

HKEY_CURRENT_USER\Software\ODBC\ODBC.INI

Registry redirection is not enabled for this registry subkey. Therefore, both ODBC Administrator tools display all user DSNs.

For more information about registry redirection, visit the following Microsoft Developer Network (MSDN) Web site:

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s