Could not resolve service name [message #644685] |
Fri, 13 November 2015 02:11 |
|
Hi All,
I can connect from client machine using SQLPLUS as below:
SQL> conn user/pass@dbservername:1522/orcl
Connected.
SQL>
But If I config tnsname.ora file as below
TEST=
(DESCRIPTION=
(ADDRESS=
(PROTOCOL=TCP)
(HOST=dbservername)
(PORT=1522)
)
(CONNECT_DATA=
(SID = orcl)
)
)
I can't connect from PL/SQL Developer using this 'TEST' tnsname.
I get error: ORA-12154: TNS: could not resolve service name.
What could be the solution for this?
Regards
Mokarem
|
|
|
Re: Could not resolve service name [message #644687 is a reply to message #644685] |
Fri, 13 November 2015 02:24 |
|
Michel Cadot
Messages: 68728 Registered: March 2007 Location: Saint-Maur, France, https...
|
Senior Member Account Moderator |
|
|
1/ Make sure PL/SQL Developer use the tnsnames.ora you think it uses
2/ See sqlnet.ora: names.default_domain
The first test is to use the same connect string in SQL*Plus to see if it works.
But I bet PL/SQL Developer does not use the same Oracle Home and so tnsnames.ora.
[Updated on: Fri, 13 November 2015 02:26] Report message to a moderator
|
|
|
Re: Could not resolve service name [message #644688 is a reply to message #644687] |
Fri, 13 November 2015 02:41 |
|
Thanks
My PL/SQL developer is using different tnsname.ora file. Now I can connect from my PL/SQL Developer.
And the content of the sqlnet file is
SQLNET.AUTHENTICATION_SERVICES= (NONE)
NAMES.DIRECTORY_PATH= (TNSNAMES)
If the sqlnet file contains names.default_domain, What would be the solution?
Regards
Mokarem
|
|
|
Re: Could not resolve service name [message #644689 is a reply to message #644688] |
Fri, 13 November 2015 02:45 |
Lalit Kumar B
Messages: 3174 Registered: May 2013 Location: World Wide on the Web
|
Senior Member |
|
|
mokarem wrote on Fri, 13 November 2015 14:11
My PL/SQL developer is using different tnsname.ora file. Now I can connect from my PL/SQL Developer.
You could have tested and confirmed the tns string with SQL*Plus itself. Then made sure PL/SQL Developer also uses the same tns string.
|
|
|
|
Re: Could not resolve service name [message #644691 is a reply to message #644689] |
Fri, 13 November 2015 03:06 |
|
Michel Cadot
Messages: 68728 Registered: March 2007 Location: Saint-Maur, France, https...
|
Senior Member Account Moderator |
|
|
Lalit Kumar B wrote on Fri, 13 November 2015 09:45mokarem wrote on Fri, 13 November 2015 14:11
My PL/SQL developer is using different tnsname.ora file. Now I can connect from my PL/SQL Developer.
You could have tested and confirmed the tns string with SQL*Plus itself. Then made sure PL/SQL Developer also uses the same tns string.
... and tnsnames.ora setting TNS_ADMIN environment variable.
|
|
|