cancel
Showing results for 
Search instead for 
Did you mean: 

I can't get PB12.5 to 64-bit Oracle

Former Member
0 Kudos

Hello,

our PB 12.5 application works perfectly on an XP box connecting to 32-bit local Oracle 10g and a 32-bit national Oracle 11g database.  With the Windows 7 rollout, we must now connect to a 64-bit local Oracle 11g database and the 32-bit national Oracle database simultaneously.  It appears that we cannot.  We have two version of Oracle installed - the 64-bit local and 32-bit client.  The oracle_home in the registry refers to the 64-bit local.  If I change this to refer to the 32-bit client, the listener immediately stops working.

The 64-bit sqlplus can access both the 64-bit oracle database and the 32-bit national database.  My .NET applications can also access both applications simultaneously.

However, If I try and create a database profile through PB12.5, I get an Ora-12557 protocol adapter error.  If I try and run the application, I get the OCI.DLL cannot be loaded message.

Does anyone have any idea how I can connect to BOTH 64-bit and 32-bit at the same time.

Much appreciated.

RS

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

If you have a local 64-bit Oracle installed then it will probably be in the path environment variable.

The OCI.DLL that it cannot load is then the 64-bit one because it is the first one in the path.

To have it find the 32-bit version instead then you need to change some environment variables for PowerBuilder. One thing you could do is set an App Path for PowerBuilder in the registry pointing it to

the oracle 32 client. I think it is HKLM\Software\Windows\Current Version\App Path

There must be a lot of pages that describes it better than I can type in this little box.

Or you can use a bat file to start PowerBuilder with the modified path etc.

Maybe it is also possible by modifying the pb exe.config file but I don't exactly know how to do that.

Ben

Former Member
0 Kudos

Ben, thanks for clarifying that PB must use the 32 bit client, but...

Changing the path environment variable had no effect.  Neither did changing the App Paths registry setting.  I also placed PB.EXE in a bat file preceded by setting the oracle path and oracle_home and it did not help.

The answer may be to change the oracle_home everywhere in the registry, but when I do that, the 64-bit local oracle listener stops working.

I'm sure the OCI.DLL in the 32 bit client needs to be accessed, but changing the path is not the answer.  I need to force PB to use that OCI.DLL and not the one in the 64-bit version of Oracle.  Do you know how I can achieve this?

former_member190719
Active Contributor
0 Kudos

What Ben recommended should work.

Also, check your path statement.  Put the 32 bit home *before* the 64 bit client in the path. Reboot the machine, make sure the database starts, and then try it again.

Former Member
0 Kudos

Gentlemen, I really appreciate your responses as they give me a starting place.  I have tried all that you have suggested.  To summarize, the 64-bit database is required and the oracle home must reference that database in order for the 64-bit listener to start.  I have placed the 32 bit oracle client in the path before the 64 bit directory.  The 32-bit OCI.DLL is being found, and now I'm getting an Oracle 12557 protocol adapter problem.

Any idea how I can proceed. 

Former Member
0 Kudos

Russ,

Can the 32-bit SqlPlus access both of the 32-bit and 64-bit databases?

With multiple ORACLE_HOMES, ORACLE_HOME64 will look for the tnsnames.ora from ORACLE_HOME64/network/admin and ORACLE_HOME32 will look under ORACLE_HOME32/network/admin.

Former Member
0 Kudos

Hi Beverly,

I was able to get it working by creating a bat file with both the path and Oracle_home set.  It works well.  So I thank you and your colleagues.

To answer your question though, the 32-bit Sqlplus could not access the 64-bit database.  The 64-bit sqlplus could access both.

Former Member
0 Kudos

Russ,

this absolutely should not be the case.

Your client version (32/64 bits) is not relevant when it comes to connect to DB from sqlplus.

Basic rule as it was mentioned above is 32 bit app needs 32 bit client to connect to DB.

I use Win 64 bit, have both 32 and 64 bit clients.

Both can access any version of DB (and believe me I work with quite a few of those).

Keep in mind you have to configure your tnsnames separately for 32 and 64 bits.

Former Member
0 Kudos

Hello Krzysztof,

I thank you for your comments, but all I know is what works and what doesn't.  Changing the path alone does not work for me.  I have to set the oracle home somehow.  If I set it in the registry, the listener stops working and, therefore, I cannot connect to the 64-bit database.  If I change the oracle_home temporarily, as with the bat file solution, I can connect to both databases.

In a nutshell, all of our workstations come with the 32-bit client.  I had to install the 64-bit full version of Oracle to access a 64-bit enterprise edition database on a new Windows 7 box.  Part of my app runs under vb.net and can access both versions of the database.  Part of the app also runs under PB12.5 and I know that I need to access the databases through the 32-bit client.  The problem is how.  Well, I know that simply putting the client in the path PRIOR to the full version of Oracle does not work.  I wish it did.  Therefore, I have to use the .bat file and set the path and oracle home temporarily.

If this doesn't make sense to you, then please enlighten me, perhaps with something concrete (I'm not trying to be facetious)

Thank you,

RS

Former Member
0 Kudos

You can use one tnsnames.ora entry to cover 32 and 64 bit.  Just create an environment variable called TNS_ADMIN and set it to the proper path.  I use that for 9i, 10g, 11g clients.

Former Member
0 Kudos

Um, there is no problem accessing the TNSNAMES.ORA.  The problem is that Powerbuilder is accessing the 64-bit version of Oracle instead of the 32-bit version unless I change the Oracle_Home setting.  At least one of your colleagues is telling me that I shouldn't have to do this, but the program working (or not) is telling me something different.  I've tried all other suggestions put forward and the only one that works is executing the Powerbuilder exe in a bat file and changing the path and oracle_home in the bat.  I can't change the Oracle_home setting in the registry because the listener will stop working. 

Thank you for your replies. 

former_member190719
Active Contributor
0 Kudos

I'm with Krzysztof though.  I'm running a 64 Oracle server and 32 bit client apps on the same machine without difficulty.

Unless you're also running a 64 bit client you don't need the 64 bit client layer on the machine.  If you remove that, the 32 bit apps will only see the 32 bit client.

Former Member
0 Kudos

Ok, the light bulbs are going off I think.  I believe that you're saying that I can keep the 64-bit Oracle server, but remove the 64-bit client - is that correct?  If so, is this easily accomplished?

former_member190719
Active Contributor
0 Kudos

Correct.

You should be able to remove the 64 bit client easily.  It's a separate install from the database itself.

Former Member
0 Kudos

Well, thank you all for your help.  I will do so.

former_member190719
Active Contributor
0 Kudos

You need to make sure that PowerBuilder is using the 32 bit client for both databases.  The client layer doesn't care what bitness the database is, only what bitness the client app is.  PowerBuilder is 32 bit, so you use the 32 bit client for both databases.

Former Member
0 Kudos

Absolutely right Bruce! We have PB working fine with any Oracle database back-end. The 32bit oracle light client is the key to success.