Skip to Main Content
  • Questions
  • Unable to connect to database using sql developer

Breadcrumb

Question and Answer

Connor McDonald

Thanks for the question, shiva.

Asked: November 29, 2016 - 5:24 pm UTC

Last updated: September 19, 2017 - 1:54 am UTC

Version: 11g

Viewed 10K+ times! This question is

You Asked

Hi ,

I am unable to connect to oracle database using SQL DEVELOPER but I am able to connect through windows cmd command. It gives me error i/o error network adapter could not establish connection. vendor code 17002. Please let me know what are the possible reasons for it and provide me the solution for the same.

Your response on this will be highly appreciated.

and Connor said...

Normally means you are connecting to the wrong port or similar.

When you connect through cmd line, as you using a tnsnames entry ? If so, then do this:

tnsping blah

for exmaple

C:\Users\comcdona>tnsping np12

TNS Ping Utility for 64-bit Windows: Version 11.2.0.4.0 - Production on 30-NOV-2016 10:22:47

Copyright (c) 1997, 2013, Oracle.  All rights reserved.

Used parameter files:
c:\oracle\product\11.2.0.4\dbhome_1\network\admin\sqlnet.ora


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = np12)))
OK (0 msec)


Using the information that comes back, in my case, localhost, 1521, np12 use that information in the basic connection information for SQL Developer and see how you go. Note the difference between SID and SERVICE_NAME

Rating

  (2 ratings)

Is this answer out of date? If it is, please let us know via a Comment

Comments

Incomprehensible

PJ, September 15, 2017 - 12:33 pm UTC

The answer does not indicate each specific step to take to resolve the problem, in both technical and layman's terms.
Connor McDonald
September 19, 2017 - 1:54 am UTC

You

- didnt give us what tool you were using when you said "but I am able to connect through windows cmd command", because the "cmd" command definitely cannot natively talk to an oracle database

- didnt give us the version of sql developer

- didnt tell us how you were trying to connect (basic, tns, etc etc)

- didnt give us much at all....


So we did our best with our hands tied behind our back

Answer

A reader, October 02, 2017 - 6:17 am UTC

This might be your SID would be different SID and not the Oracle provided SID xe. Please try with the User name which you are using in the SID column.