4 Replies Latest reply: Aug 9, 2011 5:14 PM by orafad RSS

    OracleXE 11gR2 installation - can't connect

    881341
      Just installed XE 11gR2 (32bit) on a Windows 7 (64bit) laptop. I can start the db and I can connect via the SQL console. Windows services shows that OracleServiceXE and OracleXETNSListener are both running.

      However the 'getting started' link (http://127.0.0.1:8080/apex/f?p=4950) doesn't work. And I can't establish a connection using SQLPlus using hostname=localhost, port=1521, SID=xe. "Listener refused the connection with the following error:ORA-12505, TNS:listener currently does not know of SID given in connect descriptor.

      This seems to be a common problem but I haven't seen an answer yet.
        • 1. Re: OracleXE 11gR2 installation - can't connect
          orafad
          Go through this thread {thread:id=2201312} and see if any of the steps help.

          Also note about release for x64 from: {thread:id=2205904}.
          • 2. Re: OracleXE 11gR2 installation - can't connect
            clcarter
            Firstly, if you're certain the database and listener are both running, verify there is an http endpoint in the listener status.

            In a command box, a `lsnrctl status` will confirm if your listener is indeed running, and look in the output for a section that starts "Listener Endpoints Summary ..." or something like that. You should see entries for both a PROTOCOL=TCP and an HTTP one as well, and their PORT= for the port number. Should be at least a tcp:1521 and an http:8080 entries if all is well.
            ORA-12505, TNS:listener currently does not know of SID ...
            From that error message, one can say a connection attempt was made to a listener. But the listener that was contacted for the connect request does not know of the service name or SID requested. On the host where the database is running if all is well with the client configuration a sqlplus connection should work with no extra effort at all:
            $ sqlplus /nolog 
            ... 
            connect system
            ...Password ...
            Connected.
            If you don't get a "Connected" the database is not running. For a sqlnet connection, a `connect system@xe` should also work- that will use a listener connect. The password can also be added to the connect ... just add it after the username with a slash, i.e. connect system/passwd@xe or another variation, connect system/passwd to be able to skip the password prompt. That latter connect won't touch the listener.
            • 3. Re: OracleXE 11gR2 installation - can't connect
              881341
              Thanks orafad. That previous post helped me figure out what to do. All I had to do was modify the HOST for the listener in the 'listeners.ora' file. Here's a summary.

              When I do >lsnrctl status
              . . .
              Listening Endpoints Summary...
              (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1ipc)))
              (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=S928908.srn.sandia.gov)(PORT=1521)))

              -------------
              There's no port 8080 listener.
              When I do >hostname
              S928908

              The key is the listeners.ora file at C:\oraclexe\app\oracle\product\11.2.0\server\network\ADMIN.
              I changed the "HOST=" from the machine name + domain to just the machine name (whatever 'hostname' returns)

              LISTENER =
              (DESCRIPTION_LIST =
              (DESCRIPTION =
              (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
              (ADDRESS = (PROTOCOL = TCP)(HOST = S928908.srn.sandia.gov)(PORT = 1521))
              )
              )

              changed to this:

              LISTENER =
              (DESCRIPTION_LIST =
              (DESCRIPTION =
              (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
              (ADDRESS = (PROTOCOL = TCP)(HOST = S928908)(PORT = 1521))
              )
              )

              Now when I do >lsnrctl status
              . . .
              Listening Endpoints Summary...
              (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1ipc)))
              (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=S928908.srn.sandia.gov)(PORT=1521)))

              (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=S928908.srn.sandia.gov)(PORT=8080))(Presentation=HTTP)(Session=RAW))


              The hostname still looks fully qualified, but notice that the port 8080 listener shows up now. Both the 'Getting Started' link for the admin console works as well as creating a connection via SQLDeveloper. Ultimately I need to create connections in WebLogic via my J2EE application but I had make sure this worked first.
              • 4. Re: OracleXE 11gR2 installation - can't connect
                orafad
                Yes, the "hostname" part was basically what I suspected. :)

                Good luck with setting up your app and all that!