# Friday, May 04, 2007

As I mentioned in a previous blog, I've been setting up BizTalk 2006 in a 64-bit Windows Server 2003 environment.  This BizTalk solution communicates to AS/400 and Oracle, so I've been using the Microsoft BizTalk Adapters for Enterprise Applications (for Oracle connectivity) as well as Microsoft BizTalk Adapters for Host Systems (for AS/400 DB2 connectivity).

Setting up these adapters has not gone extremely well in the 64-bit O/S (whereas a 32-bit O/S is quite simple to configure).  I've been set back about a week because many different issues related to the 64-bit environment (and a few other issues).  In this post, I want to explain the issues I've encountered with regards to the Oracle adapter in a Windows Server 2003 64-bit environment.

This post assume that you've already installed your Oracle client.  Check out my post Using the "ODBC Adapter for Oracle Database" in BizTalk 2006 for information on how to install the client.  However, if you're installing on a 64-bit machine, stop after you install the client.  The 64-bit world is quite different ...

1. Install the .NET Framework 1.1 and SP 1.

The Oracle adapter requires the .NET Framework 1.1 and SP 1.  My 64-bit environment didn't have the .NET Framework 1.1 installed, so this was an additional step I had to take.  This was the easiest of all the steps I had to take ...

2. Create the ODBC connection.

Turns out that you cannot simply run Data Sources (ODBC) from Administrative Tools.  You have to run %WINDIR%\SysWOW64\odbcad32.exe, which invokes the 32-bit version of the Data Sources (ODBC) GUI.  See my post Adding ODBC connections in Windows Server 2003 64-bit for more information.

3. Install the Microsoft BizTalk Adapters for Enterprise Applications.

I only installed Oracle (r) Database.  Surprisingly, with the .NET Framework 1.1 and SP 1 installed, this goes very well.

4. Update registry settings for the Microsoft BizTalk Adapters for Enterprise Applications.

Turns out that some of the registry keys that are written during the installation are wrong (or rather, they're not interpreted correctly).  Browse to the following registry key: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\BizTalkAdapters.  Two of the values, InstallDir and InstallPath, need to be changed.  Do the following:

1. Change InstallDir from "C:\Program Files (x86)\Microsoft BizTalk Adapters for Enterprise Applications" to "C:\Progra~2\Microsoft BizTalk Adapters for Enterprise Applications".

2. Change InstallPath from "C:\Program Files (x86)\Common Files\Microsoft BizTalk Adapters for Enterprise Applications\" to "C:\Progra~2\Common Files\Microsoft BizTalk Adapters for Enterprise Applications\".

Yes, for some reason, you have to change "Program Files (x86)" to "Progra~2", probably because the Adapter isn't written very well.  If you don't update these registry settings, you will most likely get the following error:

The description for Event ID ( 0 ) in Source ( Microsoft BizTalk Adapters for Enterprise Applications ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for details. The following information is part of the event:     Exception occurred:
            Error Code: 12154 (0x2f7a)
        08004 : [Oracle][ODBC][Ora]ORA-12154: TNS:could not resolve service name.

5. Update additional registry settings to fix permission errors if you are using domain groups for authentication.

Your domain groups will not have access to the Oracle adapter by default.  In order to allow the runtimeagent.exe (which is the executable that is spawned and runs the Oracle adapter) to run appropriately, it needs to be able to access a registry key.  See the following article for more information: http://support.microsoft.com/?id=923650.

Do the following to resolve this issue (from the article):

1. Locate the following registry key: HKEY_LOCAL_MACHINE\Software\Wow6432Node\Microsoft\BizTalkAdapters\Config

[** Thanks to Steef-Jan Wiggers for noting that I forgot to display the 32-bit path in the Wow6432Node key]

2. Right-click the registry key that you located in step 1, and then click Permissions.

3. On the Security tab, click Add.

4. Type the domain group or the domain user account that is configured as the BizTalk host instance, and then click OK.

5. On the Security tab, click the domain group or the domain user account that you added in step 4, click to select the Read check box, and then click OK.

If you don't update these registry settings, you will most likely get the following (unhelpful) error:

"RuntimeAgent: Error trapped in constructor: No connection could be made because the target machine actively refused it"

Error transmitting message: No connection could be made because the target machine actively refused it

6. Update the security permissions on your Oracle folder.

This is the most bizarre step of all, and it's not particular to the 64-bit environment.  Oracle software requires that you give the Authenticated User privilege to the Oracle Home.  In most cases, your Oracle agent will not be the Administrator account (or at least, I hope it's not).  However, there seems to be an issue with the permissions associated to Authenticated Users.  Consequently, the agent you specify to run the Oracle "runtimeagent.exe" is unable to gain access to the folder.  You might see the following error:

IM003 : Specified driver could not be loaded due to system error  5

To resolve this problem, you have to do the following:

1. Log on to Windows as a user with Administrator privileges.

 

2. Launch Windows Explorer from the Start Menu and and navigate to the ORACLE_HOME folder. This is typically the "Ora92" folder under the "Oracle" folder (i.e. D:\Oracle\Ora92).

 

3. Right-click on the ORACLE_HOME folder and choose the "Properties" option from the drop down list. A "Properties" window should appear.

 

4. Click on the "Security" tab of the "Properties" window.

 

5. Click on "Authenticated Users" item in the "Name" list (on Windows XP the "Name" list is called "Group or user names").

 

6. Uncheck the "Read and Execute" box in the "Permissions" list under the "Allow" column (on Windows XP the "Permissions" list is called "Permissions for Authenticated Users").

 

7. Re-check the "Read and Execute" box under the "Allow" column (this is the box you just unchecked).

 

8. Click the "Advanced" button and in the "Permission Entries" list make sure you see the "Authenticated Users" listed there with:

 

Permission = Read & Execute

Apply To = This folder, subfolders and files

 

If this is NOT the case, edit that line and make sure the "Apply onto" drop-down box is set to "This folder, subfolders and files". This should already be set properly but it is important that you verify this.

 

9. Click the "Ok" button until you close out all of the security properties windows. The cursor may present the hour glass for a few seconds as it applies the permissions you just changed to all subfolders and files.

 

10. Reboot your computer to assure that these changes have taken effect.

Yes, I was in as much shock as you are.  Uncheck a flag, and then re-check it.  I lost almost three days because of this bug.

That's about it!  A series of (mostly) undocumented steps that are required in order to get the Oracle adapter to function in a 64-bit environment.  Fortunately, I had some great support from the escalation engineer's with the Microsoft Product Support Services group.

 

I hope this post helps someone else avoid much of the pain and agony I had to go through ...

Best of luck!

Thursday, May 24, 2007 2:06:16 AM (Central Standard Time, UTC-06:00)
Excellent posting. You refer to support link http://support.microsoft.com/?id=923650 that is about 32-bit and the registry key should be [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\BizTalkAdapters]. You will find some more through my blog. I was facing the same thing and gone through steps you describe here. Your posting made clear that you have to change program file to Proga~2 for instance. Thanks.
Thursday, May 24, 2007 6:00:58 AM (Central Standard Time, UTC-06:00)
Glad you found the post helpful! Thank you for pointing out that I was pointed to the wrong registry key -- I have upated my post.

Best of luck!
Tuesday, July 03, 2007 9:28:34 AM (Central Standard Time, UTC-06:00)
Hello,



I have installed Biztalk Enterprise edition on a windows 2003 standard Edition (32 Bit server). I have run a simple program and Biztalk works fine. How ever i face some issues with Oracle adapter installation.



1. Created a ODBC System DSN.

2. I then installed the Oracle adapter and added the adapter to the adpters list. Created the send and receive handlers

3. I imported the project, Bindings, Rules that works fine on another machine and tried to run the project.

4. I Restarted the host instances and get the Event Type: Information Agent OracleDb started

5. After a few seconds I get the following errors in the application logs

Event Type: Error
Event Source: Microsoft BizTalk Adapters for Enterprise Applications
Event Category: None
Event ID: 0
Date: 7/3/2007
Time: 10:09:15 AM
User: N/A
Computer: LONGOSAPPDEV1
Description:
Exception occurred:
Error Code: 12154 (0x2f7a)
08004 : [Oracle][ODBC][Ora]ORA-12154: TNS:could not resolve service name


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

4. There is no issues with the tns names. I can connect using toad which uses the same tns.ora file.



5. When i open the Receive location configuration I see the tree structure of the Oracle database.

Transport properties> Managing events. There is no Porblems with the receive locations or code as it is running fine on other machines.


Did you face any issues in a 32 bit machine? And i tried to make change registry key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\BizTalkAdapters changing the path to Progra~2 and then followe steps 5 and 6 too. Then i dont see any errors in the application logs and i have reverted back to as it was before.

Any help is appreciated.



Thanks

N Reddy

Nanda
Tuesday, July 03, 2007 9:43:07 AM (Central Standard Time, UTC-06:00)
Hi N Reddy,

The error "TNS:could not resolve service name" almost always indicates one of two possibilities: 1) your TNS entry is not entered properly, or 2) a disconnect exists between the TNS entry and your ODBC connection. I'd recommend that you try the following to diagnose the underlying problem:

1) On your BizTalk Server, run SQLPlus. Try to login with the appropriate TNS name and user credentials. If this fails, you need to update your TNS file so that your machine can "resolve/find" your Oracle database.

2) Open Administrative Tools -> Data Sources (ODBC). Select the System DSN tab, select your DSN, and click configure. Click the Test button, and confirm that you are able to successfully test the connection. If this fails, make sure you have the TNS name and user credentials entered appropriately.

My guess is that the underlying problem is one (or both) of these things. Give these two tests a shot, and feel free to e-mail or post any additional questions.
Friday, January 04, 2008 8:54:29 AM (Central Standard Time, UTC-06:00)
I know this is a pretty old post, but I thought I should add this comment for anyone else who might stumble upon this article.

Make sure you install the 32-bit Oracle client, not the 64-bit. I've spent quite a lot of time trying to get the oracle adapter to work. This article was of great help, thanks.

FYI, the error I was getting when I had the 64-bit version installed(and even after I installed the 32-bit client but hadn't uninstalled 64-bit) was "ORA-12557: TNS:protocol adapter not loadable"


I'd recommend just using Windows 2003 32-bit with BizTalk 2006 if possible. Those last few days at work have been very frustrating.
Kjartan
Tuesday, January 06, 2009 2:19:07 AM (Central Standard Time, UTC-06:00)
r I was getting when I had the 64-bit version installed(and even after I installed the 32-bit client but hadn't uninstalled 64-bit) was "ORA-12557: TNS:protocol adapter not loadable"..
billx
Tuesday, January 06, 2009 2:19:52 AM (Central Standard Time, UTC-06:00)
I was getting when I had the 64-bit version installed(and even after I installed the 32-bit client but hadn't uninstalled 64-bit) was "ORA-12557: TNS:protocol adapter not loadable"..flash games..I was getting when I had the 64-bit version installed(and even after I installed the 32-bit client but hadn't uninstalled 64-bit) was "ORA-12557: TNS:protocol adapter not loadable"..
billx
Name
E-mail
Home page

Comment (Some html is allowed: a@href@title, b) where the @ means "attribute." For example, you can use <a href="" title=""> or <blockquote cite="Scott">.  

Enter the code shown (prevents robots):

Live Comment Preview