Adding ODBC connections in Windows Server 2003 64-bit

We’ve been deploying a BizTalk 2006 solution to a x64 system and, while BizTalk 2006 itself has no problems, I’ve had a lot of problems related to the BizTalk Adapters for Host Systems and the BizTalk Adapters for Enterprise Applications.  I plan to write a number of posts in the near future discussing these problems (once we have them all resolved).  In the meantime, I wanted to share this little tidbit I’ve learned about ODBC on 64-bit windows.

It’s important for you to know if your application is going to run as a 32-bit or 64-bit application.  There are two different repositories for ODBC connections, based on the drivers you’ve installed and the client that will run them.  32-bit applications will only see ODBC connections from the 32-bit side, and 64-bit applications will only see ODBC connections from the 64-bit side.

32-bit applications register ODBC connections to the following registry key:

HKEY_LOCAL_MACHINESOFTWAREWow6432NodeODBCODBC.INI

64-bit applications register ODBC connections to the following registry key:

HKEY_LOCAL_MACHINESOFTWAREODBCODBC.INI

Adding these keys is initially tricky, but if you understand the above then it should make sense.  Typically, you go to Start –> Administrative Tools –> Data Sources (ODBC) to create your ODBC connections.  And this is fine if you want to create 64-bit ODBC connections.  Any ODBC connection created using the Data Sources (ODBC) link will get created in the HKEY_LOCAL_MACHINESOFTWAREODBCODBC.INI key.  This is because it calls the program %WINDIR%System32odbcad32.exe.  However, this program will not create 32-bit ODBC connections.

To create 32-bit ODBC connections, you have to run %WINDIR%SysWOW64odbcad32.exe.  Adding an ODBC connection through this application will create the ODBC connection in the HKEY_LOCAL_MACHINESOFTWAREWow6432NodeODBCODBC.INI key, and allow your 32-bit applications to see and use the ODBC connection.

I’m still getting used to the concept of WOW and how it runs 32-bit applications on an x64 system.  This information may not be news to some of you, but it presented a challenge to me.

I hope this helps!

7 Comments

  1. Saravana says:

    Thanks for the post ,it helped me a lot.We are having 64 bit server running biztalk server 2006 on it.
    Saravana

  2. Saravana says:

    Hello Wade
    I couldnt get connected with OracleDB .Iam getting the following error when i try to connect.I have installed oracle client for windows 2003,is there a separate software for 64 bit machines.Your blog was very usefull in solving most of the issues with biztalk adapter for oracle.
    Thanks
    Saravana Ramkumar
    Event Type: Error
    Event Source: Microsoft BizTalk Adapters for Enterprise Applications
    Event Category: None
    Event ID: 0
    Date: 6/15/2007
    Time: 3:23:49 PM
    User: N/A
    Computer: PSDBIZ01
    Description:
    Exception occurred:
    IM002 : [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

    For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

  3. Wade says:

    Hi Saravana,

    Have you taken a look at the following post?

    The BizTalk Adapters for Enterprise Applications on Windows Server 2003 64-bit

    In this post I detail the exact steps you must take in order to get the Oracle adapter to work on 64-bit Windows — there are a LOT of registry hacks that you need to make, in addition to permission settings in the file system.

    I hope this helps. If not, feel free to either e-mail me directly or post another comment.

    Best of luck,

    Wade

  4. Dom Cotton says:

    Hi Wade,

    Interesting article. I didnt know about the 32 bit ODBC adminstrator.

    However I have a slightly different problem. I have installed the oracle 9i client onto a windows server 2003 R2 64 bit server. When I go into ODBC administrator I click "Add" but in here i only see SQL Server as a selection – no oracle! However if I create a .udl file on the desktop I can see Microsoft OleDB for Oracle as a provider. Whats going wrong here? Any help you can offer would be fantastic.

    Regards,
    Dom

  5. Troy says:

    Thank you so much! This one had me stumped.

  6. Fred says:

    Thank you very much for this information. It resolved our issue and saved the day!

  7. Bill K says:

    Thank you very much for your info. I was trying to figure why a php script on my Win Server
    could not find an ODBC connection.
    I had to add manually the ODBC DSN under Registry Key ….Wow6432Node…. too.

Leave a Reply