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.
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
What is the cause of this problem "IO Error: The Network Adapter could not establish the connection" on Sql Developer?
You're trying to connect to a machine on a network that SQL Developer is unable to reach.
For a TNS connection,
Look at the appropriate TNSNames entry (you will have a tnsnames.ora) file, and find the IP address or network name associated with the connection you're trying to establish -
And then start by trying to ping that resource.
In this case, i'm trying to talk to a database on MY machine, on port 1521. Yours should look quite different.
If you're using a basic connection, then you can look at the connection properties and see what machine/port you're trying to communicate with.
Ping
If you can't reach that machine from your machine, there's zero chance you can connect to a database there.
So, always start with a ping.
Once you see that you can get to that machine, if you're still getting that message, the next thing to think about is blocked ports, the listener defaults to port 1521, but you'll see that in the TNS descriptor as well.
Related Topics
How to Store Output of a SQL Server Stored Procedure in a .Txt File
Error Code 1292 Incorrect Date Value MySQL
How to Get Depatment Wise Max Salary as Well as Name of Employee Having It
SQL Server Dynamic PIVOT Query
Sql Query Is Taking More Than 4 Minutes
Sequelize Connect Etimeout When Connecting to Remote MySQL Db
Get the Number of Digits After the Decimal Point of a Float (With or Without Decimal Part)
Simple Percentage Calculation in MySQL
Run a Join Statement That Excludes Duplicate Rows
Using a Select Statement for Columns With Spaces in It
Update Multiple Rows in a Table from Another Table When Condition Exists
How to Convert a Timestamp (Date Format) to Bigint in SQL
Postgresql Convert Columns to Rows Transpose
Sqlstate[Hy000] [1045] Access Denied for User 'Root'@'Localhost' (Using Password: No)