3 Replies Latest reply: Jul 18, 2013 6:02 AM by 1012878 RSS

    how to solve the ORA-12560: TNS:protocol adapter error

    1012878

          Hello All,

       

                when i am am trying to connecting the database i am getting the error ORA-12560: TNS:protocol adapter error

       

       

      Microsoft Windows [Version 6.1.7601]

      Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

      C:\Windows\system32>set oracle_sid=QUANTUM

      C:\Windows\system32>sqlplus / as sysdba

      SQL*Plus: Release 11.2.0.3.0 Production on Mon Jul 15 12:54:50 2013

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

      ERROR:

      ORA-12560: TNS:protocol adapter error

      Enter user-name:

       

      My TNS File is below : -

      # tnsnames.ora Network Configuration File: C:\app\Onkar\product\11.2.0\dbhome_1\network\admin\tnsnames.ora

      # Generated by Oracle configuration tools.

       

       

      QVS =

        (DESCRIPTION =

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

          (CONNECT_DATA =

            (SERVER = DEDICATED)

            (SERVICE_NAME = qvs)

          )

        )

       

       

      LISTENER_QVS =

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

       

       

       

       

      ORACLR_CONNECTION_DATA =

        (DESCRIPTION =

          (ADDRESS_LIST =

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

          )

          (CONNECT_DATA =

            (SID = CLRExtProc)

            (PRESENTATION = RO)

          )

        )

       

       

      ORCL =

        (DESCRIPTION =

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

          (CONNECT_DATA =

            (SERVER = DEDICATED)

            (SERVICE_NAME = orcl)

          )

        )

       

       

      Oradb11g_home1=

        (DESCRIPTION=

          (ADDRESS_LIST=

            (ADDRESS=(PROTOCOL=TCP)(HOST=115.111.50.61)(PORT=1522))

          )

          (CONNECT_DATA=

            (SERVER=DEDICATED)

            (SERVICE_NAME=test)

          )

        )

       

      Listener :-

      # listener.ora Network Configuration File: C:\app\Onkar\product\11.2.0\dbhome_1\network\admin\listener.ora

      # Generated by Oracle configuration tools.

       

       

      SID_LIST_LISTENER =

        (SID_LIST =

          (SID_DESC =

            (SID_NAME = CLRExtProc)

            (ORACLE_HOME = C:\app\Onkar\product\11.2.0\dbhome_1)

            (PROGRAM = extproc)

            (ENVS = "EXTPROC_DLLS=ONLY:C:\app\Onkar\product\11.2.0\dbhome_1\bin\oraclr11.dll")

          )

      (SID_DESC =

            (SID_NAME = QUANTUM)

            (ORACLE_HOME = C:\app\Onkar\product\11.2.0\dbhome_1)

            (ENVS = "EXTPROC_DLLS=ONLY:C:\app\Onkar\product\11.2.0\dbhome_1\bin\oraclr11.dll")

          )

        )

       

       

      LISTENER =

        (DESCRIPTION_LIST =

          (DESCRIPTION =

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

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

          )

        )

       

       

      ADR_BASE_LISTENER = C:\app\onkar

       

      sqlnet .ora :-

      # sqlnet.ora Network Configuration File: C:\app\Onkar\product\11.2.0\dbhome_1\network\admin\sqlnet.ora

      # Generated by Oracle configuration tools.

       

       

      # This file is actually generated by netca. But if customers choose to

      # install "Software Only", this file wont exist and without the native

      # authentication, they will not be able to connect to the database on NT.

       

       

      SQLNET.AUTHENTICATION_SERVICES= (NTS)

       

       

      NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)

       

       

      Reply Quick:-

      PLZZZZZ

       

      Thanks in advance:-

      shekhar

        • 1. Re: how to solve the ORA-12560: TNS:protocol adapter error
          Su.gi

          hi,

          you must configure TNS in Net Configuration Assistant. in that you must check the perform and test. in details ---> it shows connection successful and then try it in forms.

          • 2. Re: how to solve the ORA-12560: TNS:protocol adapter error
            Billy~Verreynne

              Microsoft Windows [Version 6.1.7601]

            Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

            C:\Windows\system32>set oracle_sid=QUANTUM

            C:\Windows\system32>sqlplus / as sysdba

            SQL*Plus: Release 11.2.0.3.0 Production on Mon Jul 15 12:54:50 2013

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

            ERROR:

            ORA-12560: TNS:protocol adapter error

             

            This is a local connection (called an internal connect in the old days). The connection does not go via the Listener. It is a local IPC connection. And as you can see, you do not supply a database schema and password as credentials - the o/s user and environment need to provide the credentials.

             

            So I would not expect a TNS protocol adapter error, as this usually indicates a network driver related problem.

             

            For a local IPC connection to work, TWO_TASK must not be set, and ORACLE_SID and ORACLE_HOME must be set (and valid). The local client driver needs to launch an Oracle server process (dedicated server process to service the client driver). It finds that executable in ORACLE_HOME/bin. Next it needs that server process to "attach" itself to the database's brains (the SGA). This shared memory area is identified via the ORACLE_HOME and ORACLE_SID variables.

             

            There also is a requirement that the dedicated server process created, has the o/s permissions to attach to the SGA - which means it  needs to be run as the same o/s user as the owner of the shared memory (in other words, the client should be running in the same o/s user as the database processes).

             

            Thus the need to have these variables set. And no need for using a Listener - it is not a factor.

            • 3. Re: how to solve the ORA-12560: TNS:protocol adapter error
              1012878

              Thanks a Lot BillyVerreynne

               

                       I solved this problem.

               

              Thanks for replying