4 Replies Latest reply: Aug 6, 2007 11:52 AM by 535785 RSS

    TNS-12533 and ORA-12154

    user522961
      Hi,
      when I tnsping :
      C:\Documents and Settings\user>tnsping standby1

      TNS Ping Utility for 32-bit Windows: Version 10.2.0.1.0 - Production on 05-AO█T -2007 19:36:07

      Copyright (c) 1997, 2005, Oracle. All rights reserved.

      Fichiers de paramÞtres utilisÚs :
      C:\oracle\product\10.2.0\db_1\network\admin\sqlnet.ora


      Adaptateur TNSNAMES utilisÚ pour la rÚsolution de l'alias
      Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = LAPTOP-145.b-a-w.com)(PORT = 1522)) (CONNECT_DATA = (SERVICE_NAME = stdby1)
      TNS-12533: TNS :illegal ADDRESS parameters

      And when I try to connect :
      C:\oracle\product\10.2.0\db_1\OPatch>set ORACLE_SID=stdby1

      C:\oracle\product\10.2.0\db_1\OPatch>sqlplus /nolog

      SQL*Plus: Release 10.2.0.1.0 - Production on Dim. Ao¹t 5 19:39:52 2007

      Copyright (c) 1982, 2005, Oracle. All rights reserved.

      SQL> connect sys/change_on_install@standby1 as sysdba
      ERROR:
      ORA-12154: TNS : could not resolve service name


      I can not see the relation between two errors.
      Any help ? Thank you.

      My tnsnames.ora :
      standby1 =
      (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = LAPTOP-145.b-a-w.com)(PORT = 1522))
      (CONNECT_DATA =
      #(SERVER = DEDICATED)
      (SERVICE_NAME = stdby1)
      )
      )
      /////////////////////////////////////
      The services :
      Le service "stdby1" comporte 1 instance(s).
      L'instance "stdby1", statut UNKNOWN, comporte 1 gestionnaire(s) pour ce
      service...
      Gestionnaire(s) :
      "DEDICATED" Útabli : 0 refusÚ : 0
      LOCAL SERVER
      La commande a rÚussi
        • 1. Re: TNS-12533 and ORA-12154
          damorgan
          What you have:

          standby1 =
          (DESCRIPTION =
          (ADDRESS = (PROTOCOL = TCP)(HOST = LAPTOP-145.b-a-w.com)(PORT = 1522))
          (CONNECT_DATA =
          #(SERVER = DEDICATED)
          (SERVICE_NAME = stdby1)
          )
          )

          open at terminal window and try:

          ping LAPTOP-145.b-a-w.com

          my guess is that it does not exist.

          Replace it with 127.0.0.1 and see if that solves the problem.

          If it does then you need to either use the actual name of the host or its real IP address.
          • 2. Re: TNS-12533 and ORA-12154
            MaximDemenko
            You have improperly formatted tnsnames.ora ( the indentation does matter).
            You can try to reformat it like
            standby1 =
             (DESCRIPTION =
             (ADDRESS = (PROTOCOL = TCP)(HOST = LAPTOP-145.b-a-w.com)(PORT = 1522))
             (CONNECT_DATA =
             #(SERVER = DEDICATED)
             (SERVICE_NAME = stdby1)
             )
             )
            (notice, all lines under tns alias standby1 are indented at least by one space),
            or yet better, you create your tnsnames.ora with an oracle utility - netca or netmgr, in that case you get your config files definitely correct formatted.

            Best regards

            Maxim
            • 3. Re: TNS-12533 and ORA-12154
              user522961
              thank you Damorgan. I put 127.0.0.1 and tns ping works :
              Adaptateur TNSNAMES utilisÚ pour la rÚsolution de l'alias
              Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1522)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NA
              ME = stdby1)))
              OK (40 msec)

              But :
              C:\Documents and Settings\user>set ORACLE_SID=stdby1

              C:\Documents and Settings\user>sqlplus /nolog

              SQL*Plus: Release 10.2.0.1.0 - Production on Lun. Ao¹t 6 07:29:01 2007

              Copyright (c) 1982, 2005, Oracle. All rights reserved.

              SQL> connect sys/change_on_install@standby1 as sysdba
              ERROR:
              ORA-12518: TNS : :ORA-12518: TNS:listener could not hand off client connection

              I have already in listener.ora :
              DIRECT_HANDOFF_TTC_LISTENER = OFF

              Thanks and regards.
              • 4. Re: TNS-12533 and ORA-12154
                535785
                I get this from time to time with 10.2.0.1 client. If you install the 10.2.0.3 patchset it will resolve it.