Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The Network Adapter could not establish the connection in SQL developer

I created a database using SQL developer list of 1000 entries and it created successfully. The connection also succeeded. But today while I'm trying to connect there is an error occurring:

IO Error: The Network Adapter could not establish the connection in SQL developer

I can surely say it is not connecting I tried it in Command prompt also in prompt it is mentioning as Protocol Adapter Error.

What is the problem here?

What is meant by Protocol Adapter Error how can i overcome it?

What is Network Adapter Error?

like image 702
Dhivya Avatar asked Jul 02 '14 06:07

Dhivya


People also ask

How do you fix the network adapter could not establish the connection in Oracle SQL Developer?

How do I resolve this Network Adapter could not establish the connection error? - The listener process (service) is not running. You can re-start it with the "lsnrctl start" command or on Windows by starting the listener service.

How do I fix IO error the network adapter could not establish the connection?

Incorrect Details: Make sure that the connection details have been entered properly. The Hostname, Port, Username, and password need to be entered correctly in order to establish the connection. If any of these values aren't entered properly, the error might be triggered.

Is the Network Adapter could not establish the connection?

First of all to solve “The network adapter could not establish the connection” error, check whether you have entered the correct username and password as well as the correct Hostname and Port number. Though these are small things we cannot avoid them.


2 Answers

Please check the listener to see if it is down:-

ps -ef | grep tns

If you dont find the output of the listener then you have to start it. To do that type start in the LSNRCTL> prompt.

From the Oracle forum:

If the Oracle clients have been installed with 11.1.2.3 the TNS_ADMIN will be point to \user_projects\config\dbclient In that folder there should be a tnsnames.ora, if the Oracle DB is on the same machine you may want to copy the contents of database tnsnames folder to the TNS_ADMIN folder or as suggested change the environment variable.

like image 199
Rahul Tripathi Avatar answered Oct 19 '22 10:10

Rahul Tripathi


You need to follow few steps .

  1. Go to the directory "C:\oraclexe\app\oracle\product\11.2.0\server\network\ADMIN"
  2. Open tnsnames.ora file and change the host. Generally localhost in your case

    XE =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = XE)
    )
    )
    
  3. Open listener.ora file and change the listener host name to localhost.

    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
      (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    )
    )
    
  4. Open command prompt as administrator. Check for the listener status.

    c:\> lsnrctl status
    

    If you find listener is up then you can be able to connect to the sql developer. Other wise start the listener by using below command.

    c:\> lsnrctl start
    

    Now you can be able to login to sql developer without the above mentioned error.

like image 35
Ananta Chandra Das Avatar answered Oct 19 '22 10:10

Ananta Chandra Das