Print Thread
FAQ: ORA-12154 when trying to connect to a database
#10133 01/28/03 11:46 PM
Joined: Sep 1999
Posts: 21
F
faq Offline OP
Member
OP Offline
Member
F
Joined: Sep 1999
Posts: 21
When I try to connect to a database, It get an

Re: FAQ: ORA-12154 when trying to connect to a database
#10134 01/28/03 11:53 PM
Joined: Sep 1999
Posts: 22
S
Administrator
Offline
Administrator
S
Joined: Sep 1999
Posts: 22
If you are using multiple Oracle Homes, it is most likely that PL/SQL Developer is using a different Oracle Home than SQL*Plus. By default, PL/SQL Developer will use the Primary Oracle Home (the one that is listed first in the PATH environment variable.

There are 3 ways to resolve this:<OL TYPE=1>
[*] Start PL/SQL Developer, go to Tools > Preferences > Options tab page, and select the correct Oracle Home from the list. Restart PL/SQL Developer and try to connect again.

[*] Use the Oracle Home Selector (a standard Oracle utility) to select a different Primary Oracle Home.

[*] Add the unknown alias through the Oracle Net Configuration Assistant.
</OL>

Re: FAQ: ORA-12154 when trying to connect to a database
#10135 02/22/05 01:49 AM
Joined: Feb 2005
Posts: 1
J
JL Offline
Member
Offline
Member
J
Joined: Feb 2005
Posts: 1
I have only one Oracle install. But still having problem connect to my database.
What else can I do?

Re: FAQ: ORA-12154 when trying to connect to a database
#10136 02/22/05 10:42 PM
Joined: Aug 1999
Posts: 22,214
Member
Offline
Member
Joined: Aug 1999
Posts: 22,214
What is your PL/SQL Developer version?


Marco Kalter
Allround Automations
Re: FAQ: ORA-12154 when trying to connect to a database
#10137 10/10/06 06:17 PM
Joined: Oct 2006
Posts: 2
P
Member
Offline
Member
P
Joined: Oct 2006
Posts: 2
I have a similar problem.

When I try to connect to a remote database with PLSQL Developer, I get the error:

ORA-12154: TNS: could not resolve service name

However, when I use the Oracle Client tool called 'Net Configuration Assistant', it says the test is OK.

I can assert this by catching an ethereal trace in this case, while with PLSQL Developer nothings goes out through the link.

I had a look at this and other similar posts, but nothing seems to work in my case. I can try by deleting the other Oracle client ('oraclient') though it is not the default one.

Anyway, I will gather all the informations for Marco and send you by email.

Re: FAQ: ORA-12154 when trying to connect to a database
#10138 10/11/06 08:08 PM
Joined: Oct 2006
Posts: 2
P
Member
Offline
Member
P
Joined: Oct 2006
Posts: 2
Well, I have solved the problem...

I have seen with ethereal (without filtering by destination address as I used to do) that it was trying to resolve a name through the DNS servers.

I copy here the service as it is in my tnsnames.ora:

omp =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 159.23.98.26)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = omp)
)
)

Well, the first 'omp' is the name where PLSQLDEVELOPER will try to connect, so it needs to be resolved.

Then, if I add this line to my local hosts file, everything works fine:

159.23.98.26 omp

However, I think this is a bug in the application: in my understanding this name should just be local, to connect to the database server it should use the value:

HOST = 159.23.98.26

Another possible bug is that this name 'omp' has to match exactly the service name, which is actually the one running by the listener in the database server.

To illustrate, if I use those values in tnsnames.ora:

apps =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 159.23.98.26)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = omp)
)
)

and this in hosts:

159.23.98.26 apps

then I get the error ORA-12514.

I am really confused about all this behaviour.


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.085s Queries: 14 (0.030s) Memory: 2.5176 MB (Peak: 3.0380 MB) Data Comp: Off Server Time: 2024-05-10 07:50:03 UTC
Valid HTML 5 and Valid CSS