Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Just Installed Oracle 11g Cannot Connect to Database w/ SQL Developer

ptownbroJan 31 2017 — edited Feb 1 2017

I just installed Oracle 11g on my work dev computer which has Windows 7 64-bit and is on a network with a domain set up.  When I try to connect to the "XE" database/SID using SQL Developer I get the following errors list below.

Any ideas?

I've researched online and tried a number of the solutions suggested and cannot get it to work.  I can confirm the following:

  1. The database is started.
  2. I can connect using SQL Plus (the command prompt app that comes with Oracle).
  3. Both the OracleServiceXE and OracleXETNSListener are started (the other three services are not started: ORacleJobSchedulerXE, OracleMTSRecoveryService, and OracleXEClrAgent).
  4. Internet Information Systems (IIS) is installed and working properly.
  5. In addition to not being able to connect with SQL Developer, when I the the "Get Started" web application, it doesn't work (the url is http://127.0.0.1:8080/apex/f?p=4950)
  6. The computer is plugged in and is on. =)

When I first tried to connect, the settings in SQL Developer were as follows:

  • Hostname: localhost
  • Port: 1521
  • SID: xe

However, I got the following error:

Status : Failure -Test failed: Listener refused the connection with the following error: ORA-12505

After researching I found that I should look at the listener end points (whatever that means) in the "listner.ora" file and confirm the hostname.  That file has the following:

listener.ora

SID_LIST_LISTENER =

  (SID_LIST =

    (SID_DESC =

      (SID_NAME = PLSExtProc)

      (ORACLE_HOME = C:\Oracle\oraclexe\app\oracle\product\11.2.0\server)

      (PROGRAM = extproc)

    )

    (SID_DESC =

      (SID_NAME = CLRExtProc)

      (ORACLE_HOME = C:\Oracle\oraclexe\app\oracle\product\11.2.0\server)

      (PROGRAM = extproc)

    )

  )

LISTENER =

  (DESCRIPTION_LIST =

    (DESCRIPTION =

      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))

      (ADDRESS = (PROTOCOL = TCP)(HOST = mycomputername.abc.de.mycompany.com.)(PORT = 1521))

    )

  )

DEFAULT_SERVICE_LISTENER = (XE)

When I saw that the host name was different I first tried changing "HOST" in the listener.ora file from "mycomputername.abc.de.mycompany.com." to "localhost"  and then to "127.0.0.1" (note the previous really has an extra period at the end).  After doing that, I still got the same error message.

Then, I put everything back the way it was in the "listener.ora" file and instead went to SQL Developer and changed my login information to the following:

  • Hostname: mycomputername.abc.de.mycompany.com.   (again... there really is a period at the end)
  • Port: 1521
  • SID: xe

I even tried it with just "mycomputername". Again, I got the error message:

Status : Failure -Test failed: Listener refused the connection with the following error: ORA-12505

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 1 2017
Added on Jan 31 2017
13 comments
4,468 views