1 2 Previous Next 19 Replies Latest reply: Mar 12, 2013 1:33 PM by Gary Graham-Oracle Go to original post RSS
      • 15. Re: Can't connect to Oracle using localhost
        993830
        My machine no longer has a virus, the virus was removed 6 months ago as soon as I saw I had it.

        I have all of my data. That is backed up. but when you need your PC all day every day to work on assignments and your thesis, then the time for reimaging just isn't there. I will likely do this once the semester is over, but I can't afford to do it right now.

        Thanks for your help.
        • 16. Re: Can't connect to Oracle using localhost
          993830
          Gary,

          When I try to connect with SQL*Plus using SYSTEM as the username, it lets me in without a problem. Is there anything else that would help to try in SQL*Plus?

          Thanks!

          Best wishes,

          Brad
          • 17. Re: Can't connect to Oracle using localhost
            Gary Graham-Oracle
            Brad,
            Is there anything else that would help to try in SQL*Plus?
            I think you mean "SQL Developer" here rather than "SQL*Plus". Your connection attempt works for a local database since the basic "sqlplus user/password" method does not use the Oracle listener. SQL Developer's JDBC connections rely on having a listener up and running, however. And the SID or SERVICE_NAME you want to connect to must be registered with the listener. So if you try running lsnrctl status from the Windows command line, look for the following sections in the output...
            Listening Endpoints Summary...
              (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=yourhostname)(PORT=1521)))
            Services Summary...
            Service "xe.yourdomain.com" has 1 instance(s).
              Instance "XE", status UNKNOWN, has 1 handler(s) for this service...
            If your hostname command works, try running hostname from the Windows command line. It should return the same hostname that displays in lsnrctl status "Listening Endpoints Summary". Try substituting that hostname in your SQL Developer connection definition along with port 1521 and SID xe.

            If that does not work, I suppose you could instead try running ipconfig from the Windows command line. The output should be something like:
            C:\>ipconfig
            
            Windows IP Configuration
            
            Ethernet adapter Local Area Connection:
            
               Connection-specific DNS Suffix  . : us.oracle.com
               IPv4 Address. . . . . . . . . . . : 10.111.222.233
               Subnet Mask . . . . . . . . . . . : 255.255.224.0
               Default Gateway . . . . . . . . . : 10.111.222.1
            ...
            [followed by ip configurations for other types of connections]
            Try substituting the IPv4 address in your SQL Developer connection definition along with port 1521 and SID xe. Of course, if you use DHCP (dynamic IP assignment rather than static) the IP address will change between Windows sessions, which is not convenient. Hopefully one of those approaches will work, and you don't have that MSWSOCK.dll problem I noted earlier.

            Regards,
            Gary
            • 18. Re: Can't connect to Oracle using localhost
              993830
              Gary,

              When I ran lsnrctl status, not sure if all of this is what it's supposed to be, so here is the output in case you see something odd that I wouldn't know. Not sure if those STATUS UNKNOWN lines are anything that shouldn't be there or not:
              ----------------------------------------------------------------------------------
              Microsoft Windows [Version 6.1.7601]
              Copyright (c) 2009 Microsoft Corporation. All rights reserved.

              C:\Windows\system32>lsnrctl status

              LSNRCTL for 32-bit Windows: Version 11.2.0.2.0 - Production on 09-MAR-2013 19:51
              :12

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

              Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
              STATUS of the LISTENER
              ------------------------
              Alias LISTENER
              Version TNSLSNR for 32-bit Windows: Version 11.2.0.2.0 - Produ
              ction
              Start Date 09-MAR-2013 12:28:09
              Uptime 0 days 7 hr. 23 min. 3 sec
              Trace Level off
              Security ON: Local OS Authentication
              SNMP OFF
              Default Service XE
              Listener Parameter File C:\oraclexe\app\oracle\product\11.2.0\server\network\a
              dmin\listener.ora
              Listener Log File C:\oraclexe\app\oracle\diag\tnslsnr\Brad-HP\listener\a
              lert\log.xml
              Listening Endpoints Summary...
              (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1ipc)))
              (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=Brad-HP)(PORT=1521)))
              (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=Brad-HP)(PORT=8080))(Presentation=HT
              TP)(Session=RAW))
              Services Summary...
              Service "CLRExtProc" has 1 instance(s).
              Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service...
              Service "PLSExtProc" has 1 instance(s).
              Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
              Service "XEXDB" has 1 instance(s).
              Instance "xe", status READY, has 1 handler(s) for this service...
              Service "xe" has 1 instance(s).
              Instance "xe", status READY, has 1 handler(s) for this service...
              The command completed successfully
              -----------------------------------------------------------------

              I tried putting in my hostname and IP, but that did not work either.

              I appreciate your help

              Best wishes,

              Brad
              • 19. Re: Can't connect to Oracle using localhost
                Gary Graham-Oracle
                Hi Brad,

                This thread has aged a bit. Even though I don't have too much more to add, even if you cannot ultimately fix the problem perhaps working through it will have taught you a few principles for future reference. In terms of your lsnrctl status output:
                1. My environment uses the 11.2.0.1 listener, listening for both 11.2.0.1 and 10g XE that I have installed on my laptop.
                2. So my lsnrctl status output is a bit different from yours, but I don't see many differences, only...
                3. My services use fully qualified host names, e.g., xe.<mydnsdomain>, rather than just xe.
                4. My Endpoints Summary has nothing for port 8080, but maybe that is something from your 11g XE

                Anyway, here are a couple of forum threads I found that give some background on:
                A. Trouble shooting connection errors related to listener configuration / DB or listener not running:
                Re: Getting error while trying to connect to the oracle database using SQL Deve
                B. Best practices for specifying host names:
                Re: SQL Developer Hostname - Network Error

                Not saying either of those will help you but, as the saying goes, knowledge is power.

                -Gary
                1 2 Previous Next