Reputation: 152
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?
Upvotes: 10
Views: 110151
Reputation: 21
I had this issue but finally found a solution. Follow the next steps.
The previous steps should have solved the issue.
Note: if you don't want to repeat the above steps every time you restart your computer, just put in the ip addresses 127.0.0.1 in the files.
Upvotes: 0
Reputation: 2093
You need to follow few steps .
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)
)
)
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))
)
)
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.
Upvotes: 3
Reputation: 31
SQL Developer problem: The network adapter could not establish the connection
Open the file sqldeveloper.conf in wordpad or your favourite text editor. The file is placed in the installation directory, probably:
%programfiles%\sqldeveloper\sqldeveloper\bin\sqldeveloper.conf
Add the following line at the bottom of the file and save:
AddVMOption -Djava.net.preferIPv4Stack=true
Upvotes: 2
Reputation: 1188
In my case I need to set Hostname like "my-oracle-server-name", not by ip (192.168.1.23)
Upvotes: 0
Reputation: 125
I had a similar issue with oracle running on my suse vm. This fixed the problem: 1.) Removed the file listener.ora. 2.) Made listener part of tnsnames.ora
LISTENER_MDB1 =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
MDB1 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = MDB1)
)
)
There may be a better solution though.
Upvotes: 0
Reputation: 11
the answer for your question is some times the listener will be shut-down at this point it will not allow you to connect to the database, for example when the machine restarts. Solution is : Go to services check the Oracle_ora Db --> tns_listener is in running mode are not if not restart the services.
Upvotes: 1
Reputation: 520
I had a similar issue where I also continuously got the same error. I tried many things like changing the listener port number, turning off the firewall etc. Finally I was able to resolve the issue by changing listener.ora file. I changed the following line:
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
to
(ADDRESS = (PROTOCOL = TCP)(HOST = hostname)(PORT = 1521))
I also added an entry in the /etc/hosts file.
you can use Oracle net manager to change the above line in listener.ora file. See Oracle Net Services Administrator's Guide for more information on how to do it using net manager.
Also you can use the service name (database_name.domain_name) instead of SID while making the connnection.
Hope this helps.
Upvotes: 1
Reputation: 172458
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.
Upvotes: 5