Home » RDBMS Server » Networking and Gateways » ora-12505 error with sql developer (oracle 11g, windows 7)
ora-12505 error with sql developer [message #590669] Sun, 21 July 2013 23:50 Go to next message
SeniorInvissible
Messages: 34
Registered: July 2013
Member
I installed oracle 11g successfully and was able to login with SQL plus.
When I tried making a connection with the username and password via SQL developer I'm getting the ora-12505 error (picture is attached)

Printout of tnsname.ora:

# tnsnames.ora Network Configuration File: C:\Oracle11g\product\11.2.0\dbhome_1\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.

ORACLE11G =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = oracle11g)
    )
  )

ORACLR_CONNECTION_DATA =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    )
    (CONNECT_DATA =
      (SID = CLRExtProc)
      (PRESENTATION = RO)
    )
  )


When I execute the tnspint orcl; I get:

C:\Windows\system32>tnsping ORCL;

TNS Ping Utility for 32-bit Windows: Version 11.2.0.1.0 - Production on 22-JUL-2013 00:52:10

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

Used parameter files:
C:\Oracle11g\product\11.2.0\dbhome_1\network\admin\sqlnet.ora

TNS-03505: Failed to resolve name

C:\Windows\system32>



Could anyone assist in solving this problem and getting sql developer connected with my oracle database?
  • Attachment: Untitled.jpg
    (Size: 75.84KB, Downloaded 121 times)
Re: ora-12505 error with sql developer [message #590670 is a reply to message #590669] Sun, 21 July 2013 23:56 Go to previous messageGo to next message
Michel Cadot
Messages: 59422
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
ORA-12505: TNS:listener does not currently know of SID given in connect descriptor
 *Cause:  The listener received a request to establish a connection to a
 database or other service. The connect descriptor received by the listener
 specified a SID for an instance (usually a database instance) that either
 has not yet dynamically registered with the listener or has not been
 statically configured for the listener. This may be a temporary condition
 such as after the listener has started, but before the database instance
 has registered with the listener.
 *Action:
  - Wait a moment and try to connect a second time.
  - Check which instances are currently known by the listener by executing:
    lsnrctl services <listener name>
  - Check that the SID parameter in the connect descriptor specifies
    an instance known by the listener.
  - Check for an event in the listener.log file.

Regards
Michel
Re: ora-12505 error with sql developer [message #590671 is a reply to message #590669] Sun, 21 July 2013 23:57 Go to previous messageGo to next message
Michel Cadot
Messages: 59422
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
TNS-03505: Failed to resolve name
 *Cause:  The service name you provided could not be found in TNSNAMES.ORA,
          an Oracle Names server, or a native naming service.
 *Action: Verify that you entered the service name correctly.  You may need
          to ensure that the name was entered correctly into the network
          configuration.

Regards
Michel
Re: ora-12505 error with sql developer [message #590672 is a reply to message #590669] Sun, 21 July 2013 23:59 Go to previous messageGo to next message
BlackSwan
Messages: 22905
Registered: January 2009
Senior Member
I suspect OS/networking misconfiguration.
I doubt hostname is really localhost.
Realize localhost always has IP# of 127.0.0.1
I suspect that you PC got a real & routeable IP# via DHCP.

>I installed oracle 11g successfully and was able to login with SQL plus.

was the sqlplus login done with
or without SQL*Net?

sqlplus scott/tiger
or
sqlplus scott/tiger@orcl
Re: ora-12505 error with sql developer [message #590674 is a reply to message #590672] Mon, 22 July 2013 00:15 Go to previous messageGo to next message
SeniorInvissible
Messages: 34
Registered: July 2013
Member
Wait a moment and try to connect a second time - still giving the same problem even though I restarted my laptop

Check which instances are currently known by the listener by executing: lsnrctl services <listener name>:

C:\Windows\system32>lsnrctl services listener

LSNRCTL for 32-bit Windows: Version 11.2.0.1.0 - Production on 22-JUL-2013 01:09

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
Services Summary...
Service "CLRExtProc" has 1 instance(s).
  Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service...
    Handler(s):
      "DEDICATED" established:0 refused:0
         LOCAL SERVER
The command completed successfully

C:\Windows\system32>



Check that the SID parameter in the connect descriptor specifies an instance known by the listener - don't know how to do this

Check for an event in the listener.log file - where can I find these?


Verify that you entered the service name correctly. You may need to ensure that the name was entered correctly into the network configuration - I'm simply installing oracle 11g on my laptop, i.e. localhost. I didn't enter no configurations apart from what was done during the installation.


was the sqlplus login done with or without SQL*Net - see the picture below
  • Attachment: Untitled.jpg
    (Size: 42.58KB, Downloaded 116 times)
Re: ora-12505 error with sql developer [message #590675 is a reply to message #590674] Mon, 22 July 2013 00:19 Go to previous messageGo to next message
BlackSwan
Messages: 22905
Registered: January 2009
Senior Member
lsnrctl status

post results from above
Re: ora-12505 error with sql developer [message #590676 is a reply to message #590674] Mon, 22 July 2013 00:19 Go to previous messageGo to next message
SeniorInvissible
Messages: 34
Registered: July 2013
Member
C:\Windows\system32>tnsping oracle11g

TNS Ping Utility for 32-bit Windows: Version 11.2.0.1.0 - Production on 22-JUL-2013 01:20:14

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

Used parameter files:
C:\Oracle11g\product\11.2.0\dbhome_1\network\admin\sqlnet.ora


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = oracle11g)))
OK (3060 msec)

C:\Windows\system32>
Re: ora-12505 error with sql developer [message #590677 is a reply to message #590676] Mon, 22 July 2013 00:20 Go to previous messageGo to next message
SeniorInvissible
Messages: 34
Registered: July 2013
Member
C:\Windows\system32>lsnrctl status

LSNRCTL for 32-bit Windows: Version 11.2.0.1.0 - Production on 22-JUL-2013 01:23:26

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for 32-bit Windows: Version 11.2.0.1.0 - Production
Start Date                22-JUL-2013 00:38:17
Uptime                    0 days 0 hr. 45 min. 10 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   C:\Oracle11g\product\11.2.0\dbhome_1\network\admin\listener.ora
Listener Log File         c:\oracle11g\diag\tnslsnr\LGC12WIN7DR-L\listener\alert\log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1521ipc)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))
Services Summary...
Service "CLRExtProc" has 1 instance(s).
  Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully

C:\Windows\system32>

Re: ora-12505 error with sql developer [message #590678 is a reply to message #590676] Mon, 22 July 2013 00:21 Go to previous messageGo to next message
BlackSwan
Messages: 22905
Registered: January 2009
Senior Member
tnsping only confirms the listener & confirms NOTHING about any database
Re: ora-12505 error with sql developer [message #590679 is a reply to message #590678] Mon, 22 July 2013 00:29 Go to previous messageGo to next message
SeniorInvissible
Messages: 34
Registered: July 2013
Member
I'm trying to log into the system account with sql developer. The last time I worked with oracle was with oracle9i and would access the system account from the sql worksheet. I just installed oracle and didnt created any Database. I'm just trying to log in with the system or the sys account via sql developer
Re: ora-12505 error with sql developer [message #590680 is a reply to message #590678] Mon, 22 July 2013 00:32 Go to previous messageGo to next message
BlackSwan
Messages: 22905
Registered: January 2009
Senior Member
basic problem is that the listener does not know about any database.
listener does not require any listener.ora file.

lsnrctl stop
#move rename, remove or eliminate listener.ora file
lsnrctl start
#pause 60+ seconds
lsnrctl services
Re: ora-12505 error with sql developer [message #590681 is a reply to message #590680] Mon, 22 July 2013 00:38 Go to previous messageGo to next message
SeniorInvissible
Messages: 34
Registered: July 2013
Member
That worked, its working now. Thanks.

Why is there a listener.ora file is it isnt required in the first place?
Re: ora-12505 error with sql developer [message #590682 is a reply to message #590681] Mon, 22 July 2013 01:06 Go to previous messageGo to next message
Michel Cadot
Messages: 59422
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Net Services Reference
Chapter 7 Oracle Net Listener Parameters (listener.ora)

Regards
Michel
Re: ora-12505 error with sql developer [message #590748 is a reply to message #590682] Mon, 22 July 2013 13:16 Go to previous message
SeniorInvissible
Messages: 34
Registered: July 2013
Member
Thanks guys
Previous Topic: Connection between oracle and mssql
Next Topic: UNABLE TO TEST DBLINK BETWEEN ORACLE XE and MSSQL
Goto Forum:
  


Current Time: Thu Oct 23 00:58:54 CDT 2014

Total time taken to generate the page: 0.15515 seconds