1

I have a developer who is able to connect to Oracle database using SQL*Plus from command line.

But the person is not able to connect by using SQL*Developer.

The error is as follows :

"IO Error: The network adapter could not establish the connection"

oradbanj
  • 161
  • 1
  • 1
  • 6
  • 1
    That means you use the wrong host / port / whatever in SQL Developer. Using tnsnames? Or simple connection? – Lenniey Jan 15 '18 at 16:46
  • I am using simple connection. – oradbanj Jan 15 '18 at 16:49
  • Compare the SQL connection string to the one entered in SQL Developer, or edit them into your question. – Lenniey Jan 15 '18 at 16:52
  • On Command prompt, I am using SQLPLUS U/P@server, where server name is IP address. In SQL*Develoer, I am using Basic connection, and I am specifying relevant entries in Username, Password, Hostname (IP address), Port and Service_Name – oradbanj Jan 15 '18 at 17:15
  • This seems to be something specific to SQL*Developer. I tried using a different client tool and am able to connect. – oradbanj Jan 15 '18 at 17:21
  • In SQLPLUS you only specify U/P@IP? What's your Oracle DB name? Did you try to use SID instead of service name? – Lenniey Jan 15 '18 at 17:29
  • Let us [continue this discussion in chat](http://chat.stackexchange.com/rooms/71734/discussion-between-oradbanj-and-lenniey). – oradbanj Jan 15 '18 at 17:51

2 Answers2

1

Here are some of the things I did to resolve the problem.

  1. Download latest version of SQL*Developer ( I downloaded 17.4.0 )
  2. Go to Tools -> Preferences -> Database -> Advanced
  3. At the bottom of the screen look for "Oracle Client" and "Use OCI/Thick driver"
  4. Press "Configure" and set Oracle client to ORACLE_HOME
  5. Press "Browse" and set TNSNAMES.ORA directory

That resolved the problem.

oradbanj
  • 161
  • 1
  • 1
  • 6
0

First in SQL Plus, reset the SYS password by: ALTER USER SYS IDENTIFIED BY oracle ACCOUNT UNLOCK;

In the SQL Developer In the connection box, enter user name as "SYS as SYSDBA" and the password "oracle" from step 1.

This works.