6 Replies Latest reply on Apr 17, 2014 7:15 PM by rp0428

    Can't connect with new download of SQL Developer

    GordonBoulder

      I just installed the newest SQL developer.  When I try to set up a connection it says:      Network Adapter could not establish the connection.

      I use:

      Oracle>Connection Type: Basic

      Hostname: MYHOST

      Port 1521

      SID: xe

       

      If I use tnsping, I get:

      >tnsping MYDB

      TNS Ping Utility for 32-bit Windows: Version 9.2.0.8.0 - Production on 15-APR-20 14 14:58:30

      Copyright (c) 1997, 2006, Oracle Corporation.  All rights reserved.

      Used parameter files:
      C:\ora92\network\admin\sqlnet.ora

      Used LDAP adapter to resolve the alias
      Attempting to contact (DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=MY.MYHOST)(PORT=1521)))(CONNECT_DATA=(SID=MY_SID)))
      OK (10 msec)

       

      In that directory, there is no tnsnames.  The sqlnet.ora says LDAP as first choice.  The LDAP file lists LDAP servers.

       

      If I use (from tnsping):

      Hostname: MY.MYHOST

      SID: MY_SID

      Then it works.

       

      So- I have no idea where this new install is looking.  I went to Preferences>Database>Advanced, everything but fetch and "display null" is blank.  In "Tnsnames Directory", I put: C:\ora92\network\admin (from tnsping)

      I still get the same error.

      I change Connection type from Basic to LDAP. I copy the first server name from LDAP.ora. It gives me the context choice, I pick the one from the LDAP.ora file. LOAD button gives me DB names, I pick the DB name that I put in for the Basic Hostname.  It works!!!

      ???What is wrong? 

        • 1. Re: Can't connect with new download of SQL Developer
          thatJeffSmith-Oracle

          is the sid XE or is the sid MY_SID ?

           

          XE is the default SIDE for a connection - you need to change it to your SID

          • 2. Re: Can't connect with new download of SQL Developer
            Ratnesh Kumar Roy

            Hi,

             

            SQL developer download is open source.  You can download from Goggling.  As far as connection is concerned, can you please check whether listener is up and running or not ?

             

            Regards

            • 3. Re: Can't connect with new download of SQL Developer
              SQL developer download is open source.

              No - Sql Developer is NOT open source.

              • 4. Re: Can't connect with new download of SQL Developer
                GordonBoulder

                My impression of how the basic connectivity works is this: I give these parameters:
                Basic

                  MYHOST (Actually my HOST name)

                  1521

                  SID: xe (Default)

                 

                It goes to sqlnet.ora, finds the NAMES.DIRECTORY_PATH, sees the first choice is LDAP, goes to ldap.ora, takes the first ldap server in the list and the CONTEXT and resolves the MYHOST name.

                   Tnsping says: used … sqlnet.ora, Used LDAP to resolve…  and finds MYHOST just fine.

                   SQL Developer comes back with “can’t establish connection”.

                  

                TOAD connects fine with only the MYHOST name + UID/Passsword using these:

                  TOAD 9.5:

                  Oracle_Home_Name        OraClient9_home

                  Oracle_Home                      C:\ora92

                  Oracle_SID                          “nothing”

                  

                BUT!!! SQL Developer connects fine if I chose LDAP, then copy the Server and Context from LDAP.ora.

                  It’s as if “Basic” choice for connection isn’t looking at sqlnet.ora.

                   How come TOAD can connect with nothing but HOSTNAME but SQL Developer can’t ?

                • 5. Re: Can't connect with new download of SQL Developer
                  Gary Graham-Oracle
                  It’s as if “Basic” choice for connection isn’t looking at sqlnet.ora.

                  ExactlyConnection Type = Basic works even if no Oracle client is installed.  SQL Developer always uses JDBC, never SQL*Net (Net8).  The only need for an Oracle client (either in an Oracle Home or Instant Client installation) is if one wishes to use the JDBC OCI/Thickdriver rather than the Thin driver.


                  If you wish to use Connection Type = TNS, with or without a client installed, you can point (using Preferences > Database > Advanced) to an arbitrary directory containing a tnsnames.ora file.  And if you wish to obtain connection details using an LDAP server, then use Connection Type = LDAP.


                  Cheers,

                  Gary

                  • 6. Re: Can't connect with new download of SQL Developer
                    How come TOAD can connect with nothing but HOSTNAME but SQL Developer can’t ?

                    For the same reason an apple does NOT taste like a grapefruit.

                     

                    Toad and Sql Developer are two DIFFERENT products made by two DIFFERENT companies and do things DIFFERENT ways.

                     

                    Why would you expect them to work the same?