The Network Adapter Could Not Establish The Connection Error in oracle.
Hey guys! Have you ever faced the TNS IO error saying “The network adapter could not establish the connection”? when you are trying to make a new connection in SQL Developer or logging on to the database using SQL*Plus editor. If yes then you are at the right place because here in this blog I am going to show you how you can solve this error.
So without further ado let’s proceed to solve this badass TNS error.
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. After all “It’s the small things in a relationship that means the most.”
[bctt tweet=”How to solve “The network adapter could not establish the connection” error in just 2 steps” username=”RebellionRider”]
For the valid hostname and port number, you can check the Listener.ora if you have access to your server as the listener is a server process. In case you don’t have access to listener.ora file then you can check the tnsnames.ora file.
In case of Listener.ora file check for Host and Port entry in Listener tag for valid hostname and port number.
Listener.ora
And if you are using TNSnames.ora file for validating the hostname and port number then search for the entry which has the same name as your SID and then check for host and port number entry in that particular tag.
TNSnames.oraNow try connecting. If this solves your problem then you can avoid the next step. But if “The network adapter could not establish the connection” error is still there, then don’t worry just follow the next step.
Step 2: Is your listener taking a rest?
If your problem is still there and you haven’t gotten rid of that nasty error then there is a possibility that your Listener is not running. To check whether Listener is up and running or not, simply open up your command prompt with Administrative privileges and Write
C:\> lsnrctl status
This command will show you the status of your listener. If the output of this command looks like the one shown in the picture below then it clearly means your listener is not running thus next what you have to do is to start the listener.
To start the listener you just have to write
C:\> lsnrctl start.
This will start your listener and most probably solve your problem.
Info Byte:
In case you are hav ing problems in starting your listener then try starting “OracleOraDb11g_home1TNSListener” windows service. For that open your Run Command and write services.msc this will open your service panel. Here search for the same and right click to start it.