Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

SQLPLUS does not work but JDBC is ok

user7761672Sep 20 2010 — edited Sep 29 2010
Hi all,

I created a java app that can connected to a Oracle DB with JDBC, however, when I try to get connected to my DB using the SLQPLU I laways get this error:

[oracle@ipsm-sn01 ~]$ sqlplus myuser/mypass@orcl
ERROR:
ORA-12154: TNS:could not resolve the connect identifier specified

The SID is properly exported:
export ORACLE_SID=orcl

The JDBC url looks like:
jdbc.url=jdbc:oracle:thin:@localhost:1521:orcl
jdbc.username=myuser
jdbc.password=mypass
I have read a lot of entries about a file named TNSNAMES.ORA, I have no such file set; but the java app has been running for months without it, so I think that's not the root cause.

Thanks in advanced.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 27 2010
Added on Sep 20 2010
9 comments
3,051 views