5 Replies Latest reply: Mar 19, 2013 3:59 AM by Gary Graham-Oracle RSS

    Can't connect to remote server using sql developer

    994799
      Hi all,
      I'm trying connect to oracle database at IP: 192.168.3.28 from my sql developer.
      I have typed all fields:
      Connection Name: test
      Username: system
      Password: ******
      Hostname: 192.168.3.34
      Port: 1521
      SID: orcl

      When I click Test button, it's error: "The Network Adapter could not establish the connection". And I can't telnet 192.168.3.28 1521.
      Could anyone help me? Thanks
        • 1. Re: Can't connect to remote server using sql developer
          Jeff Smith Sqldev Pm-Oracle
          If you can't ping that IP then SQL Developer has no chance to connect to a database on that server.

          You have a network problem, not an Oracle problem.
          • 2. Re: Can't connect to remote server using sql developer
            994799
            No, I can ping but I can't telnet although I chose telnet client & telnet server in control pannel
            • 3. Re: Can't connect to remote server using sql developer
              Gary Graham-Oracle
              Try reading through the referenced link to the trouble shooting steps in (A), and the best practices in (B).

              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

              Other analysis steps for (A) may include running these from a Windows command console...
              1. lsnrctl status (on the remote host)
              2. lsnrctl services (on the remote host)
              3. tracert <ip|hostname> (on the client machine)

              Hope this helps,
              Gary

              Edited by: Gary Graham on Mar 18, 2013 8:34 PM
              • 4. Re: Can't connect to remote server using sql developer
                994799
                I change host name in two files listener.ora
                # listener.ora Network Configuration File: G:\app\Dandelion\product\11.2.0\dbhome_1\network\admin\listener.ora
                # Generated by Oracle configuration tools.

                SID_LIST_LISTENER =
                (SID_LIST =
                (SID_DESC =
                (SID_NAME = CLRExtProc)
                (ORACLE_HOME = G:\app\Dandelion\product\11.2.0\dbhome_1)
                (PROGRAM = extproc)
                (ENVS = "EXTPROC_DLLS=ONLY:G:\app\Dandelion\product\11.2.0\dbhome_1\bin\oraclr11.dll")
                )
                )

                LISTENER =
                (DESCRIPTION_LIST =
                (DESCRIPTION =
                (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
                (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.3.31)(PORT = 1521))
                )
                )

                ADR_BASE_LISTENER = G:\app\Dandelion


                and tnsnames.ora
                # tnsnames.ora Network Configuration File: G:\app\Dandelion\product\11.2.0\dbhome_1\network\admin\tnsnames.ora
                # Generated by Oracle configuration tools.

                LISTENER_ORCL =
                (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.3.31)(PORT = 1521))


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

                ORCL =
                (DESCRIPTION =
                (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.3.31)(PORT = 1521))
                (CONNECT_DATA =
                (SERVER = SHARED)
                (SERVICE_NAME = orcl)
                )
                )

                Do I have to change host=localhost to host = ip of remote host ?
                • 5. Re: Can't connect to remote server using sql developer
                  Gary Graham-Oracle
                  Do I have to change host=localhost to host = ip of remote host ?
                  Not sure if the listener.ora and tnsnames.ora files you listed are on your client machine or on the remote server. If you read through the links I posted earlier, you must realize the appropriate listener is the one on the server. You should never use localhost in the listener definition (refer to the best practices link). So the listener and tnsnames files on the server should use either its IP address (hopefully a static IP address) or its host name.

                  Why can't you employ a host name, better yet, a fully qualified host name? Presumably your private network IP address are static. And did you read on the trouble shooting link that inability to telnet is typically the result of the listener not running or a firewall issue? You really need to understand how that private network environment of yours is working.