1 2 Previous Next 28 Replies Latest reply: May 3, 2013 11:53 AM by sb92075 RSS

    ORA-12505, TNS:listener does not currently know of SID given

    801933
      I follow the procedure in
      [http://docs.oracle.com/cd/E11882_01/appdev.112/e10766/tdddg_connecting.htm]
      but when press "Test" button in Oracle SQL Developer, the following error prompt:
      failure-listener refused the connection with the following error: ORA-12505, TNS:listener does not currently know of SID given in connect descriptor. The Connection descriptor used by the client was localhost:1521:ORCL

      the listener.ora content is
      # tnsnames.ora Network Configuration File: C:\app\product\11.1.0\db_2\network\admin\tnsnames.ora
      # Generated by Oracle configuration tools.

      ORCL11G =
      (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = TeamC-Dell-2)(PORT = null))
      (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orcl11g)
      )
      )

      THRMIS =
      (DESCRIPTION =
      (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = lemon.vtc.edu.hk)(PORT = 1527))
      )
      (CONNECT_DATA =
      (SERVICE_NAME = thrmis)
      )
      )

      LISTENER_ORCL11G =
      (ADDRESS = (PROTOCOL = TCP)(HOST = TeamC-Dell-2)(PORT = null))

      #add by kei
      ORCL =
      (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
      (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orcl)
      )
      )

      and the content of tnsnames.ora is
      # tnsnames.ora Network Configuration File: C:\app\product\11.1.0\db_2\network\admin\tnsnames.ora
      # Generated by Oracle configuration tools.

      ORCL11G =
      (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = TeamC-Dell-2)(PORT = null))
      (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orcl11g)
      )
      )

      THRMIS =
      (DESCRIPTION =
      (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = lemon.vtc.edu.hk)(PORT = 1527))
      )
      (CONNECT_DATA =
      (SERVICE_NAME = thrmis)
      )
      )

      LISTENER_ORCL11G =
      (ADDRESS = (PROTOCOL = TCP)(HOST = TeamC-Dell-2)(PORT = null))

      the output of command LSNRCTL STATUS is

      C:\Users\TeamC>LSNRCTL STATUS

      LSNRCTL for 32-bit Windows: Version 11.1.0.6.0 - Production on 08-MAY-2012 11:46:35

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

      Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
      TNS-12535: TNS:operation timed out
      TNS-12560: TNS:protocol adapter error
      TNS-00505: Operation timed out
      32-bit Windows Error: 60: Unknown error
        • 1. Re: ORA-12505, TNS:listener does not currently know of SID given
          sb92075
          open Command Window & issue following OS commands

          lsnrctl status
          lsnrctl service

          COPY commands & results then PASTE all back here
          • 2. Re: ORA-12505, TNS:listener does not currently know of SID given
            Helios-GunesEROL
            Hi;

            Please see:
            TNS-12535: SQL*NET LISTENER STARTUP TIMES OUT - ON VMS SERVER [ID 1076312.6]
            VIP Failover Take Long Time After Network Cable Pulled [ID 403743.1]

            Regard
            Helios
            • 3. Re: ORA-12505, TNS:listener does not currently know of SID given
              801933
              sb92075 wrote:
              open Command Window & issue following OS commands

              lsnrctl status
              lsnrctl service

              COPY commands & results then PASTE all back here
              C:\Users\TeamC>lsnrctl status

              LSNRCTL for 32-bit Windows: Version 11.1.0.6.0 - Production on 08-MAY-2012 13:11:58

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

              Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
              TNS-12535: TNS:operation timed out
              TNS-12560: TNS:protocol adapter error
              TNS-00505: Operation timed out
              32-bit Windows Error: 60: Unknown error

              C:\Users\TeamC>lsnrctl service

              LSNRCTL for 32-bit Windows: Version 11.1.0.6.0 - Production on 08-MAY-2012 13:12:33

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

              Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
              TNS-12535: TNS:operation timed out
              TNS-12560: TNS:protocol adapter error
              TNS-00505: Operation timed out
              32-bit Windows Error: 60: Unknown error

              C:\Users\TeamC>

              Edited by: user10064903 on May 8, 2012 1:16 PM
              • 4. Re: ORA-12505, TNS:listener does not currently know of SID given
                801933
                very strange, I change the listener.ora as follow:
                ORCL11G =
                (DESCRIPTION =
                (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
                (CONNECT_DATA =
                (SERVER = DEDICATED)
                (SERVICE_NAME = orcl11g)
                )
                )

                THRMIS =
                (DESCRIPTION =
                (ADDRESS_LIST =
                (ADDRESS = (PROTOCOL = TCP)(HOST = lemon.vtc.edu.hk)(PORT = 1527))
                )
                (CONNECT_DATA =
                (SERVICE_NAME = thrmis)
                )
                )

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

                and I change tnsnames.ora as follow
                ORCL11G =
                (DESCRIPTION =
                (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
                (CONNECT_DATA =
                (SERVER = DEDICATED)
                (SERVICE_NAME = orcl11g)
                )
                )

                THRMIS =
                (DESCRIPTION =
                (ADDRESS_LIST =
                (ADDRESS = (PROTOCOL = TCP)(HOST = lemon.vtc.edu.hk)(PORT = 1527))
                )
                (CONNECT_DATA =
                (SERVICE_NAME = thrmis)
                )
                )

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

                now i can connect to HR database!!
                but if running lsnrctl status and lsnrctl service, the result is the same as before!!

                C:\Users\TeamC>lsnrctl status

                LSNRCTL for 32-bit Windows: Version 11.1.0.6.0 - Production on 08-MAY-2012 15:04:41

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

                Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
                TNS-12535: TNS:operation timed out
                TNS-12560: TNS:protocol adapter error
                TNS-00505: Operation timed out
                32-bit Windows Error: 60: Unknown error

                C:\Users\TeamC>lsnrctl service

                LSNRCTL for 32-bit Windows: Version 11.1.0.6.0 - Production on 08-MAY-2012 15:05:20

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

                Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
                TNS-12535: TNS:operation timed out
                TNS-12560: TNS:protocol adapter error
                TNS-00505: Operation timed out
                32-bit Windows Error: 60: Unknown error

                C:\Users\TeamC>
                • 5. Re: ORA-12505, TNS:listener does not currently know of SID given
                  HuaMin Chen
                  Try to put the IP of the DB directly as the host in your current TNSNAMES file
                  • 6. Re: ORA-12505, TNS:listener does not currently know of SID given
                    801933
                    try and not different for the command output:
                    C:\Users\TeamC>lsnrctl service

                    LSNRCTL for 32-bit Windows: Version 11.1.0.6.0 - Production on 08-MAY-2012 15:39:56

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

                    Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
                    TNS-12535: TNS:operation timed out
                    TNS-12560: TNS:protocol adapter error
                    TNS-00505: Operation timed out
                    32-bit Windows Error: 60: Unknown error

                    C:\Users\TeamC>lsnrctl status

                    LSNRCTL for 32-bit Windows: Version 11.1.0.6.0 - Production on 08-MAY-2012 15:40:36

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

                    Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
                    TNS-12535: TNS:operation timed out
                    TNS-12560: TNS:protocol adapter error
                    TNS-00505: Operation timed out
                    32-bit Windows Error: 60: Unknown error
                    • 7. Re: ORA-12505, TNS:listener does not currently know of SID given
                      HuaMin Chen
                      How about to tnsping that IP?
                      • 8. Re: ORA-12505, TNS:listener does not currently know of SID given
                        801933
                        my db is installed in my notebook, so is it means tnsping 127.0.0.1? if yes, the result is:

                        C:\Users\TeamC>tnsping 127.0.0.1

                        TNS Ping Utility for 32-bit Windows: Version 11.1.0.6.0 - Production on 08-MAY-2012 16:07:00

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

                        Used parameter files:
                        C:\app\product\11.1.0\db_2\network\admin\sqlnet.ora

                        Used EZCONNECT adapter to resolve the alias
                        Attempting to contact (DESCRIPTION=(CONNECT_DATA=(SERVICE_NAME=))(ADDRESS=(PROTOCOL=TCP)(HOST=127.0.0.1)(PORT=1521)))
                        OK (20 msec)

                        C:\Users\TeamC>
                        • 9. Re: ORA-12505, TNS:listener does not currently know of SID given
                          HuaMin Chen
                          Can you pls tnsping the real IP of your notebook?
                          • 10. Re: ORA-12505, TNS:listener does not currently know of SID given
                            801933
                            sorry, is the real ip address found by
                            http://www.myipaddress.com/what-is-my-ip-address/


                            if yes, the result is
                            C:\Users\TeamC>tnsping 121.202.77.91

                            TNS Ping Utility for 32-bit Windows: Version 11.1.0.6.0 - Production on 08-MAY-2012 16:54:34

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

                            Used parameter files:
                            C:\app\product\11.1.0\db_2\network\admin\sqlnet.ora

                            Used EZCONNECT adapter to resolve the alias
                            Attempting to contact (DESCRIPTION=(CONNECT_DATA=(SERVICE_NAME=))(ADDRESS=(PROTOCOL=TCP)(HOST=121.202.77.91)(PORT=1521)))
                            TNS-12535: TNS:operation timed out

                            if using ipconfig, there is 2 ip and I don't know which one should use
                            Windows IP 設定


                            Ethernet 介面卡 區域連線 2:

                            連線特定 DNS 尾碼 . . . . . . . . :
                            連結-本機 IPv6 位址 . . . . . . . : fe80::7d22:5ec6:b2c8:19e1%11
                            IPv4 位址 . . . . . . . . . . . . : 10.62.125.32
                            子網路遮罩 . . . . . . . . . . . .: 255.255.255.0
                            預設閘道 . . . . . . . . . . . . .:

                            無線區域網路介面卡 無線網路連線:

                            連線特定 DNS 尾碼 . . . . . . . . :
                            連結-本機 IPv6 位址 . . . . . . . : fe80::20eb:2347:dc60:3961%8
                            IPv4 位址 . . . . . . . . . . . . : 172.20.10.2
                            子網路遮罩 . . . . . . . . . . . .: 255.255.255.240
                            預設閘道 . . . . . . . . . . . . .: 172.20.10.1

                            C:\Users\TeamC>
                            • 11. Re: ORA-12505, TNS:listener does not currently know of SID given
                              HuaMin Chen
                              Since there are 2 connection, I suggest you turn off your router and keep only one line (1st one above), and restart PC/retest.
                              • 12. Re: ORA-12505, TNS:listener does not currently know of SID given
                                801933
                                only one connection when test (cannot online at that moment)

                                C:\Users\TeamC>ipconfig

                                Windows IP 設定


                                Ethernet 介面卡 區域連線 2:

                                連線特定 DNS 尾碼 . . . . . . . . :
                                連結-本機 IPv6 位址 . . . . . . . : fe80::7d22:5ec6:b2c8:19e1%11
                                IPv4 位址 . . . . . . . . . . . . : 10.62.125.32
                                子網路遮罩 . . . . . . . . . . . .: 255.255.255.0
                                預設閘道 . . . . . . . . . . . . .:

                                無線區域網路介面卡 無線網路連線:

                                媒體狀態 . . . . . . . . . . . . .: 媒體已中斷連線
                                連線特定 DNS 尾碼 . . . . . . . . :

                                Ethernet 介面卡 區域連線 5:

                                媒體狀態 . . . . . . . . . . . . .: 媒體已中斷連線
                                連線特定 DNS 尾碼 . . . . . . . . :

                                通道介面卡 區域連線* 2:

                                媒體狀態 . . . . . . . . . . . . .: 媒體已中斷連線
                                連線特定 DNS 尾碼 . . . . . . . . :

                                通道介面卡 區域連線* 6:

                                媒體狀態 . . . . . . . . . . . . .: 媒體已中斷連線
                                連線特定 DNS 尾碼 . . . . . . . . :

                                通道介面卡 區域連線* 9:

                                媒體狀態 . . . . . . . . . . . . .: 媒體已中斷連線
                                連線特定 DNS 尾碼 . . . . . . . . :

                                通道介面卡 區域連線* 13:

                                媒體狀態 . . . . . . . . . . . . .: 媒體已中斷連線
                                連線特定 DNS 尾碼 . . . . . . . . :

                                C:\Users\TeamC>tnsping 10.62.125.32

                                TNS Ping Utility for 32-bit Windows: Version 11.1.0.6.0 - Production on 08-MAY-2012 17:44:45

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

                                Used parameter files:
                                C:\app\product\11.1.0\db_2\network\admin\sqlnet.ora

                                Used EZCONNECT adapter to resolve the alias
                                Attempting to contact (DESCRIPTION=(CONNECT_DATA=(SERVICE_NAME=))(ADDRESS=(PROTOCOL=TCP)(HOST=10.62.125.32)(PORT=1521)))
                                OK (120 msec)

                                C:\Users\TeamC>
                                • 13. Re: ORA-12505, TNS:listener does not currently know of SID given
                                  HuaMin Chen
                                  Now put such IP in both your TNSNAMES file and the listener file of the DB. Then restart the PC and retest.
                                  • 14. Re: ORA-12505, TNS:listener does not currently know of SID given
                                    801933
                                    still the same error

                                    C:\Users\TeamC>tnsping 10.62.125.32

                                    TNS Ping Utility for 32-bit Windows: Version 11.1.0.6.0 - Production on 08-MAY-2012 18:16:42

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

                                    Used parameter files:
                                    C:\app\product\11.1.0\db_2\network\admin\sqlnet.ora

                                    Used EZCONNECT adapter to resolve the alias
                                    Attempting to contact (DESCRIPTION=(CONNECT_DATA=(SERVICE_NAME=))(ADDRESS=(PROTOCOL=TCP)(HOST=10.62.125.32)(PORT=1521)))
                                    OK (20 msec)

                                    C:\Users\TeamC>lsnrctl service

                                    LSNRCTL for 32-bit Windows: Version 11.1.0.6.0 - Production on 08-MAY-2012 18:16:58

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

                                    Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
                                    TNS-12532: TNS:invalid argument
                                    TNS-12560: TNS:protocol adapter error
                                    TNS-00502: Invalid argument
                                    32-bit Windows Error: 65: Unknown error

                                    C:\Users\TeamC>lsnrctl status

                                    LSNRCTL for 32-bit Windows: Version 11.1.0.6.0 - Production on 08-MAY-2012 18:17:15

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

                                    Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
                                    TNS-12532: TNS:invalid argument
                                    TNS-12560: TNS:protocol adapter error
                                    TNS-00502: Invalid argument
                                    32-bit Windows Error: 65: Unknown error

                                    C:\Users\TeamC>


                                    the content of listener.ora is
                                    ORCL11G =
                                    (DESCRIPTION =
                                    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.62.125.32)(PORT = 1521))
                                    (CONNECT_DATA =
                                    (SERVER = DEDICATED)
                                    (SERVICE_NAME = orcl11g)
                                    )
                                    )

                                    THRMIS =
                                    (DESCRIPTION =
                                    (ADDRESS_LIST =
                                    (ADDRESS = (PROTOCOL = TCP)(HOST = lemon.vtc.edu.hk)(PORT = 1527))
                                    )
                                    (CONNECT_DATA =
                                    (SERVICE_NAME = thrmis)
                                    )
                                    )

                                    LISTENER_ORCL11G =
                                    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.62.125.32)(PORT = 1521))

                                    the content of tnsnames.ora is
                                    ORCL11G =
                                    (DESCRIPTION =
                                    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.62.125.32)(PORT = 1521))
                                    (CONNECT_DATA =
                                    (SERVER = DEDICATED)
                                    (SERVICE_NAME = orcl11g)
                                    )
                                    )

                                    THRMIS =
                                    (DESCRIPTION =
                                    (ADDRESS_LIST =
                                    (ADDRESS = (PROTOCOL = TCP)(HOST = lemon.vtc.edu.hk)(PORT = 1527))
                                    )
                                    (CONNECT_DATA =
                                    (SERVICE_NAME = thrmis)
                                    )
                                    )

                                    LISTENER_ORCL11G =
                                    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.62.125.32)(PORT = 1521))
                                    1 2 Previous Next