Solved

ODP.NET installed but now I think there might be two oracle homes? cannot connect anyway....

Posted on 2011-03-16
8
707 Views
Last Modified: 2012-05-11
Hi,

I was trying to install ODP.NET there, and that went ok. It installed to E:\oracle\product\10.2.0\client_1... But, the thing is I already have an oracle home under E:\oracle\ora92

So, I can connect OK using the ODACHome1 using TOAD and I can connect to the original home ORAHome92 ok. However, when I try it through code I get an error 'ORA-12154: TNS:could not resolve the connect identifier specified'.

I think this is probably because the default home is ORAHome92 and probably I need to set it to ODACHome1. Or, somehow I need to specify that the ODP.NET code should use ODACHome1. Well, I'm just guessing there really. What should I do to fix this? (I'm using VS 2005; VB.NET)

Thanks Aiden
0
Comment
Question by:AidenA
  • 5
  • 2
8 Comments
 
LVL 34

Accepted Solution

by:
johnsone earned 250 total points
Comment Utility
Within the original home, there should be a tnsnames.ora file.  If you copy that file to the new home, in the same place (the network\admin directory), that should let you use either home directory.
0
 

Author Comment

by:AidenA
Comment Utility
Hi thanks, yes i tried that but it didn't work. Are you sure that the default home being the wrong one isn't a problem?
0
 
LVL 34

Expert Comment

by:johnsone
Comment Utility
The ORA-12154 error would indicate that something is incorrect with the tnsnames.ora file, or the connect string.

You should be able to change the default home with the home selector utility.
0
 

Author Comment

by:AidenA
Comment Utility
ok but tnsnames.ora was working fine absolutely no problems until i just installed ODP.NET. so clearly that changed something. Now, even if I try and use my previous method of connecting (OraOLEDB.Oracle) it is producing this error. I'll have a check about this home selector but if i look at the environmental variables they show:

E:\oracle\product\10.2.0\client_1\bin;E:\oracle\ora92\bin;C:\Program Files\Oracle\jre\1.3.1\bin;C:\Program Files\Oracle\jre\1.1.8\bin;

as the first few environmental variables... I tried to remove the first one just to see if i could connect as i did before the installation... but no luck...
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

Author Comment

by:AidenA
Comment Utility
ok this is starting to get bad. still trying to just get my original connections working and now getting a The 'OraOLEDB.Oracle' provider is not registered on the local machine

think i'm just going to try and uninstall ODP.NET...
0
 
LVL 76

Assisted Solution

by:slightwv (䄆 Netminder)
slightwv (䄆 Netminder) earned 250 total points
Comment Utility
Oledb error is like a PATH issue.  Put the old home in the path first.

For the tns error: set an environment variable TNS_ADMIN pointing to the folder with the correct tnsnames.ora file.

I would suggest the env var as a test.  Once you get it working we can get the file in the proper place.
0
 

Author Comment

by:AidenA
Comment Utility
i was busy on something else there... but will start back on this on friday i think... and I think also i'll have to go with ODP.NET after all since I inadvertently convinced others to go with it to!

the OraOLEDB.Oracle started working by itself i think just after i turned off the machine and came in the next day... so I just need to get ODP.NET working again... i'll let you know how I go on that and check your suggestions
0
 

Author Comment

by:AidenA
Comment Utility
actually i managed to solve this issue but can't remember how exactly... i think it might have just been a coding issue. Either way I'll just close off this question and won't add to knowledge base...

thanks for help...
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

How to Unravel a Tricky Query Introduction If you browse through the Oracle zones or any of the other database-related zones you'll come across some complicated solutions and sometimes you'll just have to wonder how anyone came up with them.  …
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

772 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now