Oracle SQL Developer: Failure - Test failed: The Network Adapter could not establish the connection?
I am answering this for the benefit of future community users. There were multiple issues. If you encounter this problem, I suggest you look for the following:
- Make sure your tnsnames.ora is complete and has the databases you wish to connect to
- Make sure you can tnsping the server you wish to connect to
- On the server, make sure it will be open on the port you desire with the specific application you are using.
Once I did these three things, I solved my problem.
I am getting error The network adapter could not establish the connection in my oracle database
After 4 hours continuous efforts, finally I got answer of my question. I am writing this for others facing the same problem. There are three things you have to take care to resolve this error.
First thing is to change your oracle database port number. You can find this in oracle folder location go to oracle folder and follow this hierarchy oracle -> product -> 11.2.0(you may have different folder name according to your version) -> server -> config
in config folder you will find log and script folders go to log folder and open postDBConnection.log file open it in text editor you will find
dbms_xdb.sethttpport('8080');
just change 8080 to any other port number do the same for script folder open postDBConnection.sql file and modify it. Your port number will be changed.
Second thing is you can check for your hostname and port number for listener. follow the folder hierarchy
oracle -> product -> 11.2.0(you may have different folder name according to your version) -> server -> network -> Admin now open listener.ora and tnsnames.ora open both files one by one and verify hostname and port number. This information should be same in both files as well as in you connection.
Third thing is be sure that your listener port is started. Right click on "ThisPC" you will find "Manage" option click on it now click on "Services and Aplicaions" now click on "Services" in services find oracle service. Here you will find "OracleXETNSListener" or another name of oracle listener. Right click on it and start it. Now restart your oracle database.
For further help refer to the link below:
https://www.youtube.com/watch?v=pMQXVihgrrE&t=254s
Oracle SQL Developer: Test failed: The Network Adapter could not establish the connection?
I used to fight with VM networking settings such that my host could 'see' my vm, and vice versa.
I stopped worrying about this once i learned about port forwards.
You can simply tell VirtualBox to take traffic from your local port, say 1521, and forward that to the VM, say also 1521.
So when connecting to the VM from my host in SQL Developer, I can go to localhost:1521, and have my connection traffic go to the Oracle Listener on my Linux VBox image, listening on port 1521
Click on Port Forwarding
Add an entry for TCP 1521 and 1521
Then, in SQL Developer you can simply do this to connect to your DB on the VM
Oracle 11g DBCP The Network Adapter could not establish the connection
The problem was that I used this syntax jdbc:oracle:thin:@localhost:1521/ORCL
for the connection string. After /
Oracle expects service name and not SID (ORCL is my SID).
The solution was to change the connection sring to jdbc:oracle:thin:@localhost:1521:ORCL
Related Topics
SQL for Ordering by Number - 1,2,3,4 etc Instead of 1,10,11,12
Division (/) Not Giving My Answer in Postgresql
Find SQL Records Containing Similar Strings
Counting the Number of Occurrences of a Substring Within a String in Postgresql
How to Implement SQL Intersect and Minus Operations in Ms Access
How to Handle Optional Parameters in SQL Query
Function-Based Indexes in SQL Server
SQL Server Select into @Variable
Update Multiple Columns in SQL
Do I Need to Create Indexes on Foreign Keys on Oracle
SQL Update Fields of One Table from Fields of Another One
Delete All But Top N from Database Table in SQL
Finding Node Order in Xml Document in SQL Server
How to Use a Dynamic Parameter in a in Clause of a JPA Named Query
Opinions on Sensor/Reading/Alert Database Design