Print Thread
32bit vs 64bit... Does ORACLE/PREFERENCES fix this?
#57726 03/19/18 03:49 PM
Joined: Jun 2011
Posts: 12
G
Member
OP Offline
Member
G
Joined: Jun 2011
Posts: 12
Hello,

As a suggestion, might I recommend a forum STICKY FAQ which discusses 32 bit vs 64 bit? I know you get asked questions on this regularly. In my scenario (Win 10 Pro, 64 bit, Delphi Tokyo 10.2.3, DOA 4.1.3.5), I have Delphi and Oracle 12cR2 64 bit database/client installed on the same machine. Oracle is only 64 bit, Delphi is only 32 bit... so some challenges exist. I have found several forum notes (including an old one of mine) on this subject, but I am wondering is there is now a new way around this?

I have downloaded the 32 bit Instant Client, and unzipped it to a directory. If I look at the Oracle / Preferences menu in Delphi, there is an entry for OracleHome and OCIDLL. I would think I could leave OracleHome empty, and put in the OCIDLL value for where the InstantClient oci.dll 32 bit is loaded. I did this, restarted Delphi, and tried a sample app. I still get the initialization error showing that DOA is looking for OCI.dll in $ORACLE_HOME, not the instant client directory. In short, is there a way to use the Oracle/Preferences entries so I don't have to constantly change environment variables?

Thank you

Re: 32bit vs 64bit... Does ORACLE/PREFERENCES fix this?
#57734 03/20/18 09:40 AM
Joined: Aug 1999
Posts: 22,218
Member
Offline
Member
Joined: Aug 1999
Posts: 22,218
Using the OCIDLL preference should fix this at design-time. I'm not sure why this does not work for you.

The easiest setup is to install both the full 32 bit and 64 bit Oracle Clients. This way Direct Oracle Access will always find the correct client based on the 32 bit or 64 bit registry entries that are created by the Oracle installer. Now you are no longer dependent on environment variables to switch between the two. At design-time it will use the 32 bit Oracle Client, and at run-time it will use the Oracle Client that corresponds with the target platform of your project (32 or 64 bit).


Marco Kalter
Allround Automations
Re: 32bit vs 64bit... Does ORACLE/PREFERENCES fix this?
Marco Kalter #57737 03/20/18 11:54 AM
Joined: Jun 2011
Posts: 12
G
Member
OP Offline
Member
G
Joined: Jun 2011
Posts: 12
Making progress... I turned off Virus protection, downloaded 12.2.0.2 32 bit client, and installed as Administrator, choosing 'Administration' option.

When I run SQL*Dev, I connect fine. (Connection type=basic, setting SID=orcl). When I run SQL*Plus, I now get a TNS Protocol error. I found that it is now using 32 bit SQL*Plus. When I use a fully pathed SQL*Plus (to 64 bit version), it connects fine as username/password. When I start Delphi Tokyo, I have set the ORACLE/PREFERENCES, and restarted. When I run the Deptemp demo, I enter my username/passwword, leaving database blank, and immediately get an ORA-12560: TNS:Protocol adapter error. I emptied out the ORACLE/PREFERENCES, restarted Delphi, ran the same DeptEmp, and get the same thing. If I put in 'orcl' as database, there is a long delay, and then I get ORA-12154:TNS: could not resolve the connect identifier specified. If I run 'lsnrctl services', I do show a service called 'orcl' with status of ready, and 14 established connections.

How do I debug this? How do I connect using DOA with a local connection from within Delphi?


Last edited by G Spears; 03/20/18 12:04 PM.
Re: 32bit vs 64bit... Does ORACLE/PREFERENCES fix this?
G Spears #57738 03/20/18 05:00 PM
Joined: Jun 2011
Posts: 12
G
Member
OP Offline
Member
G
Joined: Jun 2011
Posts: 12
Solved! Relevant Details: full 64 bit Oracle on Windows 10 machine. Installed full client 32 bit on machine in separate directory. My PATH environment variable shows the client 32 bit directory first, then it shows the 64 bit client directory. When I check the listener, it is looking at the 64 bit file. When a client tried to connect, it is looking at the 32 bit listener files, and subsequently not finding anything. To correct this, I need to set a system level environment variable TNS_ADMIN to point to the network/admin directory in the 64 bit client. I then have to use the username/password@orcl syntax to connect, but it works...

Last edited by G Spears; 03/20/18 05:01 PM.

Moderated by  support 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.1.33 Page Time: 0.090s Queries: 14 (0.031s) Memory: 2.5131 MB (Peak: 3.0394 MB) Data Comp: Off Server Time: 2024-05-15 05:28:14 UTC
Valid HTML 5 and Valid CSS