3 Replies Latest reply: Dec 23, 2012 10:59 AM by sb92075 RSS

    [ORA-12504: TNS:listener was not given the SERVICE_NAME in CONNECT_DATA]

    981411
      Problem statment:
      ===============
      While Installing my product(xyz) - Installer fails to connect to DB_Instance - ora11g :(

      It fails every time with following error:
      [ORA-12504: TNS:listener was not given the SERVICE_NAME in CONNECT_DATA]

      Can any one help me to resolve this problem? Thanks in Advance!!

      Please find below configuration details:

      tnsnames.ora contents
      ======================

      ORA11G =
      (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = pw-pun-atm-pt02)(PORT = 1521))
      (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = ora11g)
      )
      )

      LISTENER_ORA11G =
      (ADDRESS = (PROTOCOL = TCP)(HOST = pw-pun-atm-pt02)(PORT = 1521))

      ****************


      And listner.ora contects are as follows:
      ========================================

      SID_LIST_LISTENER =
      (SID_LIST =
      (SID_DESC =
      (SID_NAME = ora11g)
      (ORACLE_HOME = D:\oracle\Administrator\product\11.2.0\dbhome_1)
      (PROGRAM = extproc)
      (ENVS = "EXTPROC_DLLS=ONLY:D:\oracle\Administrator\product\11.2.0\dbhome_1\bin\oraclr11.dll")
      )
      )

      LISTENER =
      (DESCRIPTION_LIST =
      (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
      (ADDRESS = (PROTOCOL = TCP)(HOST = pw-pun-atm-pt02)(PORT = 1521))
      )
      )

      ADR_BASE_LISTENER = D:\oracle\Administrator

      ****************

      C:\Users\Administrator>lsnrctl start

      LSNRCTL for 64-bit Windows: Version 11.2.0.1.0 - Production on 23-DEC-2012 21:25:41

      Copyright (c) 1991, 2010, Oracle. All rights reserved.

      Starting tnslsnr: please wait...

      TNSLSNR for 64-bit Windows: Version 11.2.0.1.0 - Production
      System parameter file is D:\oracle\Administrator\product\11.2.0\dbhome_1\network\admin\listener.ora
      Log messages written to d:\oracle\administrator\diag\tnslsnr\pw-pun-atm-pt02\listener\alert\log.xml
      Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1521ipc)))
      Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=pw-pun-atm-pt02)(PORT=1521)))

      Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
      STATUS of the LISTENER
      ------------------------
      Alias LISTENER
      Version TNSLSNR for 64-bit Windows: Version 11.2.0.1.0 - Production
      Start Date 23-DEC-2012 21:25:46
      Uptime 0 days 0 hr. 0 min. 5 sec
      Trace Level off
      Security ON: Local OS Authentication
      SNMP OFF
      Listener Parameter File D:\oracle\Administrator\product\11.2.0\dbhome_1\network\admin\listener.ora
      Listener Log File d:\oracle\administrator\diag\tnslsnr\pw-pun-atm-pt02\listener\alert\log.xml
      Listening Endpoints Summary...
      (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1521ipc)))
      (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=pw-pun-atm-pt02)(PORT=1521)))
      Services Summary...
      Service "ora11g" has 1 instance(s).
      Instance "ora11g", status UNKNOWN, has 1 handler(s) for this service...
      The command completed successfully

      C:\Users\Administrator>

      ****************
        • 1. Re: [ORA-12504: TNS:listener was not given the SERVICE_NAME in CONNECT_DATA]
          sb92075
          978408 wrote:
          Problem statment:
          ===============
          While Installing my product(xyz) - Installer fails to connect to DB_Instance - ora11g :(

          It fails every time with following error:
          [ORA-12504: TNS:listener was not given the SERVICE_NAME in CONNECT_DATA]

          Can any one help me to resolve this problem? Thanks in Advance!!

          Please find below configuration details:

          tnsnames.ora contents
          ======================

          ORA11G =
          (DESCRIPTION =
          (ADDRESS = (PROTOCOL = TCP)(HOST = pw-pun-atm-pt02)(PORT = 1521))
          (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SERVICE_NAME = ora11g)
          )
          )

          LISTENER_ORA11G =
          (ADDRESS = (PROTOCOL = TCP)(HOST = pw-pun-atm-pt02)(PORT = 1521))

          ****************


          And listner.ora contects are as follows:
          ========================================

          SID_LIST_LISTENER =
          (SID_LIST =
          (SID_DESC =
          (SID_NAME = ora11g)
          (ORACLE_HOME = D:\oracle\Administrator\product\11.2.0\dbhome_1)
          (PROGRAM = extproc)
          (ENVS = "EXTPROC_DLLS=ONLY:D:\oracle\Administrator\product\11.2.0\dbhome_1\bin\oraclr11.dll")
          )
          )

          LISTENER =
          (DESCRIPTION_LIST =
          (DESCRIPTION =
          (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
          (ADDRESS = (PROTOCOL = TCP)(HOST = pw-pun-atm-pt02)(PORT = 1521))
          )
          )

          ADR_BASE_LISTENER = D:\oracle\Administrator

          ****************

          C:\Users\Administrator>lsnrctl start

          LSNRCTL for 64-bit Windows: Version 11.2.0.1.0 - Production on 23-DEC-2012 21:25:41

          Copyright (c) 1991, 2010, Oracle. All rights reserved.

          Starting tnslsnr: please wait...

          TNSLSNR for 64-bit Windows: Version 11.2.0.1.0 - Production
          System parameter file is D:\oracle\Administrator\product\11.2.0\dbhome_1\network\admin\listener.ora
          Log messages written to d:\oracle\administrator\diag\tnslsnr\pw-pun-atm-pt02\listener\alert\log.xml
          in log.xml will be a line containing 12504 error code value,
          post this line along with 3 lines above & 3 lines below from log.xml back here
          • 2. Re: [ORA-12504: TNS:listener was not given the SERVICE_NAME in CONNECT_DATA]
            981411
            Not found any traces for error - 12504 in log.xml ... Is there are any log level setting for same - It is currently set to 'Trace level is currently 0'

            Thanks,
            Rajendra
            • 3. Re: [ORA-12504: TNS:listener was not given the SERVICE_NAME in CONNECT_DATA]
              sb92075
              978408 wrote:
              Not found any traces for error - 12504 in log.xml ... Is there are any log level setting for same - It is currently set to 'Trace level is currently 0'

              Thanks,
              Rajendra
              file a Bug Report with Oracle