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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Unable to connect from SQLPLUS but able to connect from ORACLE SQL DEVELOPER

Bitra HemanthAug 1 2017 — edited Oct 29 2017

Hello team,

I am not able connect default username i.e scott and hr from SQLPLUS in Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 64bit

It is showing below errors

SQL> conn scott/tiger@pdborcl

ERROR:

ORA-12154: TNS:could not resolve the connect identifier specified

Warning: You are no longer connected to ORACLE.

SQL> conn hr/hr@pdborcl

ERROR:

ORA-12154: TNS:could not resolve the connect identifier specified

But able to connect from Oracle Sql developer below is the configuration for scott and hr in sql developer

Scott.jpg

hr.jpg

and tnsname.ora and listener.ora configuration is already available for pdborcl below is the configuration details

TNSNAME.ora

ORCL =

  (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))

    (CONNECT_DATA =

      (SERVER = DEDICATED)

      (SERVICE_NAME = orcl)

    )

  )

  PDBORCL =

    (DESCRIPTION =

      (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))

      (CONNECT_DATA =

        (SERVER = DEDICATED)

        (SERVICE_NAME = pdborcl)

      )

    )

LISTENER.ora

LISTENER =

  (DESCRIPTION_LIST =

    (DESCRIPTION =

      (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))

      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))

    )

  )

Please check my configuration whether i have configured wrong and advice on issue.

Thanks and regards,

Hemanth.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 26 2017
Added on Aug 1 2017
25 comments
4,981 views