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!

Oracle 12c SQL developer works but SQLplus doesnt work, Could not resolve the connect Identifier spe

3425375Dec 28 2017 — edited Jan 4 2018

Hello,

just like the title says, i have an oracle 12c database server, simple setup, on a window Server 2012 R2, i can easily connect to it fine with SQL Developer, the information is below:

hostname: oracle_Prod

port 1521

SID ORACLEPD

i try the same thing with oracle SQLplus, using command / as sysdba, or / as sys, tried set Oracle_SID=  ORACLEPD, then tried again sqlplus, but still same error message:

Opeartion generated Oracle Error 12154, TNS: could not resolve the connect identifier specified

i am checking the tnsnames.ora file:

ORACLEPD =

  (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP)(HOST = oracle_Prod.iehp.local)(PORT = 1521))

    (CONNECT_DATA =

      (SERVER = DEDICATED)

      (SERVICE_NAME = ORACLEPD.iehp.local)

    )

  )

ORACLR_CONNECTION_DATA =

  (DESCRIPTION =

    (ADDRESS_LIST =

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

    )

    (CONNECT_DATA =

      (SID = CLRExtProc)

      (PRESENTATION = RO)

    )

is there anything wrong with my tnsnames.ora? how can i be sure that the instance is pointing to the correct tnsnames.ora?

also, i do have a system environment variables and i made sure its called TNS_Admin and pointing to the tnsnames.ora file, also the path is going directly to the Oracle home directory BIN = 12.1.0\dbhome\bin

anything else i am missing??

thanks in advance

  )

This post has been answered by EdStevens on Jan 4 2018
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 1 2018
Added on Dec 28 2017
73 comments
4,737 views