5 Replies Latest reply: Nov 14, 2012 4:39 AM by 12cdb RSS

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

    576227
      Hello,

      I just installed the Oracle Express Edition 10g on a Linux Lubuntu 12.10 and am now trying to set up a listener.

      The server and the client are on the same machine.

      When trying to access the LEARNINTOUCH database:
      sqlplus hr/hr@LEARNINTOUCH
      I get the following error message:
      ORA-12154: TNS:could not resolve the connect identifier specified

      Same thing for the XE database:
      sqlplus hr/hr@XE
      I also get the following error message:
      ORA-12154: TNS:could not resolve the connect identifier specified

      I can however log in as system user.

      I set the variable
      export TNS_ADMIN=$ORACLE_HOME/network/admin
      but it did not help.

      Here is the content of the oracle/xe/app/oracle/product/10.2.0/server/network/admin/listener.ora file:

      SID_LIST_LISTENER =
      (SID_LIST =
      (SID_DESC =
      (SID_NAME = PLSExtProc)
      (ORACLE_HOME = /usr/lib/oracle/xe/app/oracle/product/10.2.0/server)
      (PROGRAM = extproc)
      )
      )

      LISTENER =
      (DESCRIPTION_LIST =
      (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
      (ADDRESS = (PROTOCOL = TCP)(HOST = stephane-ThinkPad-X61s)(PORT = 1521))
      )
      )

      DEFAULT_SERVICE_LISTENER = (XE)

      Here is the content of the oracle/xe/app/oracle/product/10.2.0/server/network/admin/sqlnet.ora file:

      NAMES.DIRECTORY_PATH= (LDAP, TNSNAMES, HOSTNAME)
      NAMES.DEFAULT_DOMAIN = WORLD
      TRACE_LEVEL_CLIENT = OFF
      SQLNET.EXPIRE_TIME = 30

      Here is the content of the oracle/xe/app/oracle/product/10.2.0/server/network/admin/tnsnames.ora file:

      LEARNINTOUCH =
      (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = stephane-ThinkPad-X61s)(PORT = 1521))
      (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = learnintouch)
      )
      )

      XE =
      (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = stephane-ThinkPad-X61s)(PORT = 1521))
      (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = XE)
      )
      )

      EXTPROC_CONNECTION_DATA =
      (DESCRIPTION =
      (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
      )
      (CONNECT_DATA =
      (SID = PLSExtProc)
      (PRESENTATION = RO)
      )
      )