Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I seem to be having an issue connecting a 32-bit .NET application to a 64-bit server, without a full Oracle client.

If I build a 64-bit application, using the 64-bit ODP.NET dll's or a 64-bit instant client, everything seems to work fine. But if I build a 32-bit ODP.NET application or use the 32-bit instant client, it always goes "looking" for the 64-bit dll's, and errors out on me.

Has anyone encountered this before, or have any suggestions as to what issues we might be having?

We don't have the same problem connecting to SQL Server (of course, SQL server uses mixed-mode assemblies...)

share|improve this question
    
Are the client and server on the same machine? Whether the server is 32 or 64 bit should make no difference to the client AFAIK –  Jack Douglas Oct 13 '11 at 10:45
    
To the client it doesn't. To the actual dlls it seems to. –  Brian Deragon Oct 13 '11 at 10:50
    
The dlls on the client or the server? –  Jack Douglas Oct 13 '11 at 11:00
    
No, this is a .NET assembly that's being built. The .NET assembly looks for the ODP.NET 64-bit dll, regardless if you you're running 32-bit, or 64-bit. This obviously causes us problems on 32-bit systems. The problem goes away if I use the full oracle client, or if we deploy to a 64-bit machine. Theoretically...it doesn't make any sense. –  Brian Deragon Oct 13 '11 at 12:46
    
I think I understand. The fact that the server is 64-bit is not the issue right? Rather there is some incompatibility between different bits on the client? –  Jack Douglas Oct 13 '11 at 13:32
show 2 more comments

1 Answer 1

Did you control PATH Environment Variable to which comes first, 32 or 64. Which ever client is installed last, change PATH accordingly. I have encountered similar issue. Windows uses PATH environment variable to decide which dlls to load. I have two clients installed in my machine and used PATH variable to force which one to use.

C:\oracle\product\11.2.0>dir
 Directory of C:\oracle\product\11.2.0

20.09.2011  10:07    <DIR>          .
20.09.2011  10:07    <DIR>          ..
20.09.2011  10:08    <DIR>          client32Bit
20.09.2011  10:04    <DIR>          client64Bit

C:\oracle\product\11.2.0>echo %PATH%

XXXX;C:\oracle\product\11.2.0\client64Bit\BIN;
share|improve this answer
    
Welcome to dba.se Atilla and thanks for your useful contributions here and elsewhere :) –  Jack Douglas Nov 14 '11 at 11:19
    
Thanks for the contribution, sorry I didn't get back to you earlier, had a baby and a bit of a hiatus from this project. However, changing the path hasn't resolved the issue. Thanks for the info though and welcome to stack exchange! –  Brian Deragon Nov 21 '11 at 22:38
    
@BrianDeragon congratulation on having a baby. –  Atilla Ozgur Nov 22 '11 at 8:10
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.