1 2 Previous Next 17 Replies Latest reply: Oct 29, 2009 11:37 AM by pablobarreno RSS

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

    538177
      Hi, i'm new with Oracle. I'm using JDeveloper 10g, when i try to create a database connection with the hr/hr user i get this message:

      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


      Please, if somebpdy could give me a tip, i repeat, i'm new with Oracle. Thanks
        • 1. Re: ORA-12505, TNS:listener does not currently know of SID given in connect
          RPuttagunta
          Is the oracle service on your computer?

          Can you do this from your command line:

          tnsping ORCL;

          and paste what you get.

          Rahul.

          Message was edited by:
          RPuttagunta
          • 2. Re: ORA-12505, TNS:listener does not currently know of SID given in connect
            Mohammed Taj
            first wait few minus. n try again
            if problem persist
            then
            post here oracle sid and tnsnames.ora files.
            • 3. Re: ORA-12505, TNS:listener does not currently know of SID given in connect
              Eduardo Legatti
              Hi,

              Check to make sure that the SID is correct. The SIDs that are currently registered with the listener can be obtained by typing:

              LSNRCTL SERVICES on the Server

              These SIDs correspond to SID_NAMEs in TNSNAMES.ORA or DB_NAME in the initialization file.

              Cheers
              • 4. Re: ORA-12505, TNS:listener does not currently know of SID given in connect
                538177
                Rahul: when i type what you told me i get this:

                C:\Documents and Settings\Alejandro>tnsping ORCL

                TNS Ping Utility for 32-bit Windows: Version 9.2.0.1.0 - Production on 10-OCT-20
                06 01:03:53

                Copyright (c) 1997 Oracle Corporation. All rights reserved.

                Used parameter files:
                C:\oracle\ora91\network\admin\sqlnet.ora

                TNS-03505: Failed to resolve name

                I don't know what this means, this is the TNSNames file:


                GLOBAL =
                (DESCRIPTION =
                (ADDRESS_LIST =
                (ADDRESS = (PROTOCOL = TCP)(HOST = MARROC)(PORT = 1521))
                )
                (CONNECT_DATA =
                (SERVICE_NAME = Global)
                (SRVR = DEDICATED)
                )
                )

                Rahul why there is not a SID specified?? And why I can connect to the DB with Toad???
                Thanks for your help.
                • 5. Re: ORA-12505, TNS:listener does not currently know of SID given in connect
                  Mohammed Taj
                  just post

                  lnsrctl services
                  or
                  tnsnames.ora file content.
                  thanx
                  • 6. Re: ORA-12505, TNS:listener does not currently know of SID given in connect
                    RPuttagunta
                    Rahul why there is not a SID specified??
                    The sid is specified but, is called Service_name from now on (I think from 9i, guys, correct me if I am wrong) - here, the service_name in your case is 'Global' (SERVICE_NAME = Global)

                    Run this and let us know what you get:

                    C:\Documents and Settings\Alejandro>lsnrctl services



                    and also


                    C:\Documents and Settings\Alejandro>tnsping Global
                    • 7. Re: ORA-12505, TNS:listener does not currently know of SID given in connect
                      517402
                      TNS-12505 TNS:listener could not resolve SID given in connect descriptor
                      Cause: The SID in CONNECT_DATA was not found in the listener's tables.
                      Action: Check to make sure that the SID specified is correct. The SIDs that are
                      currently registered with the listener can be obtained by typing "LSNRCTL
                      SERVICES listener_name". These SIDs correspond to SID_NAMEs in
                      TNSNAMES.ORA, or DB_NAMES in the INIT.ORA file.
                      • 8. Re: ORA-12505, TNS:listener does not currently know of SID given in connect
                        538177
                        C:\Documents and Settings\Alejandro>lsnrctl services

                        LSNRCTL for 32-bit Windows: Version 9.2.0.1.0 - Production on 10-OCT-2006 19:44:
                        21

                        Copyright (c) 1991, 2002, Oracle Corporation. All rights reserved.

                        Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
                        Services Summary...
                        Service "Global" has 2 instance(s).
                        Instance "GlobalId", status UNKNOWN, has 1 handler(s) for this service...
                        Handler(s):
                        "DEDICATED" established:0 refused:0
                        LOCAL SERVER
                        Instance "GlobalId", status READY, has 1 handler(s) for this service...
                        Handler(s):
                        "DEDICATED" established:2 refused:0 state:ready
                        LOCAL SERVER
                        Service "GlobalIdXDB" has 1 instance(s).
                        Instance "GlobalId", status READY, has 1 handler(s) for this service...
                        Handler(s):
                        "D000" established:33 refused:0 current:33 max:1002 state:ready
                        DISPATCHER <machine: MARROC, pid: 3824>
                        (ADDRESS=(PROTOCOL=tcp)(HOST=marroc)(PORT=1038))
                        Service "PLSExtProc" has 1 instance(s).
                        Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
                        Handler(s):
                        "DEDICATED" established:0 refused:0
                        LOCAL SERVER
                        The command completed successfully



                        C:\Documents and Settings\Alejandro>tnsping Global

                        TNS Ping Utility for 32-bit Windows: Version 9.2.0.1.0 - Production on 10-OCT-20
                        06 19:46:31

                        Copyright (c) 1997 Oracle Corporation. All rights reserved.

                        Used parameter files:
                        C:\oracle\ora91\network\admin\sqlnet.ora


                        Used TNSNAMES adapter to resolve the alias
                        Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)
                        (HOST = MARROC)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = Global) (SRVR = D
                        EDICATED)))
                        OK (30 msec)

                        Any idea?
                        • 9. Re: ORA-12505, TNS:listener does not currently know of SID given in connect
                          522573
                          By your last post seems the connection to database good, because 'TNSPING' is returning 30 msec. But if you can't connect from JDeveloper 10g I suppose this is due to JDeveloper is using the SID term in place of SERVICE_NAME. Can you edit your "TNSNAMES.ORA" and change SERVICE_NAME by SID and try to connect from JDeveloper, without restarting listener (it's not necessary)?
                          • 10. Re: ORA-12505, TNS:listener does not currently know of SID given in connect
                            538177
                            I changed SERVICE_NAME by SID and i still can't connect either with JDeveloper or TOAD. So i changed again to SERVICE_NAME and i can connect to the db only with TOAD. Thanks anyway.
                            • 11. Re: ORA-12505, TNS:listener does not currently know of SID given in connect
                              477720
                              Check the global database name and replace in sid
                              or try this
                              global =
                              (DESCRIPTION =
                              (ADDRESS_LIST =
                              (ADDRESS = (PROTOCOL = TCP)(HOST = MARROC)(PORT = 1521))
                              )
                              (CONNECT_DATA =
                              (SERVICE_NAME = Global)
                              )
                              )
                              • 12. Re: ORA-12505, TNS:listener does not currently know of SID given in connect
                                Mohammed Taj
                                check ur tns_admin entry is correctly set.
                                or set again tns_admin variable and try again.
                                • 13. Re: ORA-12505, TNS:listener does not currently know of SID given in connect des
                                  696344
                                  Is this a bug of the oracle? It seems that after installation, the listener is working well..after restarting, the listener may not work. I have tried the ff kind of installation:

                                  1. Connect a named PC to a domain.
                                  2. Create a MSLoopBack interface and set IP address to this interface to 10.10.10.10
                                  3. Add an entry to WINDOWS/system32/drivers/etc/hosts file for the hostname of the PC
                                  4. Install Oracle
                                  5. After installation, this works well
                                  6. After restarting may still work.
                                  7. Shutdown the PC. On the next day, the oracle listener wont work


                                  1. Isolate a named PC from network
                                  2. Set some fixed IP address
                                  3. Add an entry to WINDOWS/system32/drivers/etc/hosts file for the hostname of the PC
                                  4. Install Oracle
                                  5. After installation, this works well
                                  6. After restarting may still work.
                                  7. Shutdown the PC. On the next day, the oracle listener wont work anymore

                                  weird thing is that when you run "lsnrctl services" after step 4, you will get a service same to the global database name set on the installation
                                  at step 7, that mentioned service name does not exist anymore even if there are no configurations done after installation*_.

                                  I have also doubled check that there are no changes to listener.ora, tnsnames.ora and sqlnet.ora between steps 4 to 7.

                                  Any Idea? Thanks!

                                  Edited by: user11034177 on Apr 15, 2009 2:07 AM
                                  • 14. Re: ORA-12505, TNS:listener does not currently know of SID given in connect des
                                    707801
                                    Yes, I experienced the same thing with a clean install of 10.2.0.1 (after LoopBack Adapter). The listener stopped working after a reboot of the machine. I wonder if extending the listener.ora's SID_LIST_LISTENER is sufficient. But still, will I lose my settings again after each reboot? Is this a bug.....?
                                    1 2 Previous Next