?
Solved

Can not create odbc connection to oracle

Posted on 2013-01-23
19
Medium Priority
?
1,122 Views
Last Modified: 2013-03-30
I had to reinstall my oracle client and have run into a problem.

I have installed "Oracle Data Access Components for Oracle Client 11.2.0.3.0’" on
Win7Pro 64bit.  No problem on that install.

I  then tried to create a dsn entry to be able to connect my oracle db.  The problem is that the list of TNS SERVICE NAMES comes up empty...Any ideas?

I do know that my TNSNAME.ORA file is correct and in

"C:\app\username\product\11.2.0\client_1\Network\Admin"

Thx
G
0
Comment
Question by:gdinunzio
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 4
  • 2
  • +2
19 Comments
 
LVL 77

Expert Comment

by:slightwv (䄆 Netminder)
ID: 38811045
What ODBC administration program are you using, the 32Bit or the 64Bit?

They are in two different directories:
http://support.microsoft.com/kb/942976

•The 64-bit version of the Odbcad32.exe file is located in the %systemdrive%\Windows\System32 folder.
0
 
LVL 23

Expert Comment

by:paquicuba
ID: 38811054
Can you connect using SQL*Plus?
0
 
LVL 23

Expert Comment

by:paquicuba
ID: 38811067
In "system DSN" tab, when you click on "Add", are you selecting "Oracle in OraDb11g_home1" ?
0
Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

 

Author Comment

by:gdinunzio
ID: 38811120
I am using the 64 bit.  The oracle ODBC provider does not show up in the 32 bit version (makes sense since i only installed the 64 bit version and have no need for the 32 bit version).

The provider does show up in the 64 bit but with the problem noted above.
0
 

Author Comment

by:gdinunzio
ID: 38811126
In "system DSN" tab, when you click on "Add", are you selecting "Oracle in OraDb11g_home1" ?

YES
0
 
LVL 23

Expert Comment

by:paquicuba
ID: 38811385
I have the same installation at home and it works ( I'll check when I get there.) The 64Bit ODBC admin should be the one visible in the Control Panel...
0
 
LVL 23

Expert Comment

by:paquicuba
ID: 38811505
Have you tried installing "64-bit ODAC 11.2 Release 5 (11.2.0.3.20) for Windows x64" from here: http://www.oracle.com/technetwork/database/windows/downloads/index-090165.html
?
0
 

Author Comment

by:gdinunzio
ID: 38816227
Turns out the install for 32 was corrupted and a reinstall and verifying the registry settings from a coworker fixed it.
0
 

Author Comment

by:gdinunzio
ID: 38820330
I've requested that this question be closed as follows:

Accepted answer: 0 points for gdinunzio's comment #a38816227

for the following reason:

The TNSNames.ora file for 32 bit did NOT work for the 64 bit.
0
 
LVL 77

Expert Comment

by:slightwv (䄆 Netminder)
ID: 38816255
>>The TNSNames.ora file for 32 bit did NOT work for the 64 bit.

To clarify this statement:  the tnsnames.ora file doesn't care about bit versions.
0
 

Author Comment

by:gdinunzio
ID: 38820331
ok this isnt working as i had planned

My 32 bit install is working with both SQLPlus and pass thru queries/linked tables in access.  It is using a system DSN

My 64 bit install is working with pass thru queries/linked tables in access,  It is using a user dsn.  No SQLPlus on the ODAC x64 install.

Now the problem is compiling my web services.  It gives me the same error no matter what platform i try to compile for, x86, x64, or Any CPU:

"An attempt was made to load an assembly with an incorrect format: C:\app\gdinunzio\product\11.2.0\client_64\odp.net\bin\4\Oracle.DataAccess.dll"

help...

I dont know if i have made this harder than i needed to.  All i really need to have the ability to develop a .net web service project which goes on a 64bit server and the ability to run queries against the production database both in SQLPlus and in MS Access (using linked tables)

TIA
g
0
 
LVL 15

Expert Comment

by:Franck Pachot
ID: 38851077
Hi,

If I understand well, you are working only in 64-bits. So you should de-install only the 32-bits client. If you have both, it can be messed up if the oracle home name (that is in the registery key) was the same. I don't think it is a good idea to have both. I'm not even sure that it is supported.

If you need SQL Plus and you don't have it in the ODAC, then deinstall the ODAC and install the full client.

Check that everything is clean: only one client, one registry entry, one System.Data.OracleClient.dll  in C:\Windows\assembly the Version and Processor Architecture, etc.

Regards,
Franck.
0
 

Accepted Solution

by:
gdinunzio earned 0 total points
ID: 38851244
I uninstalled both the full 32bit client and the 64bit ODAC.  I deleted the all the Oracle and ODBC entries in the registry.

I reinstalled the 32bit client, using a custom install (basically need .NET and SQLPlus) and then
reinstalled the 64bit ODAC.  

It gave me the same problem.  I was able to finally fix the issue by changing the target server in the WEB tab in my project from the virtual server to the local IIS server.

I am not sure why its fixed but am glad it is.
0
 
LVL 15

Expert Comment

by:Franck Pachot
ID: 38852031
Good to know that is works. But having both 32bit and 64bit is not a good idea.
>> I reinstalled the 32bit client, using a custom install (basically need .NET and SQLPlus) and then reinstalled the 64bit ODAC.  
Why not only the 64bit client with ODP.NET and sqlplus ?
Regards,
Franck.
0
 

Author Comment

by:gdinunzio
ID: 38852074
I honestly don't know.  To save time I just configured it like another user has it.  They have both the 32bit and 64bit so i just made it exactly the same.

I would think that 64bit ODAC + SQLPlus would do it but i dont have more time to test.

Thanks all
GL
0
 
LVL 10

Expert Comment

by:Tony Barkdull
ID: 38947830
I saw this on a new install and had to manually edit the tnsnames.ora file because the syntax was incorrect. Pay close attention to this. The one everyone else was using it (tnsnames.ora) successfully in Win7 32, but did NOT work for Win7 64. Once I edited it (sorry I don't have an example), all worked as usual.
0

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you try to share a printer , you may receive one of the following error messages. Error message when you use the Add Printer Wizard to share a printer: Windows could not share your printer. Operation could not be completed (Error 0x000006…
There are many software programs on offer that will claim to magically speed up your computer. The best advice I can give you is to avoid them like the plague, because they will often cause far more problems than they solve. Try some of these "do it…
This Micro Tutorial will go in depth within Systems and Security in Windows 7 and will go into detail regarding Action Center, Windows Firewall, System, etc. This will be demonstrated using Windows 7 operating system.
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Suggested Courses
Course of the Month10 days, 23 hours left to enroll

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question