SQL Developer – The Network Adapter could not establish the connection

database connectionoraclesqldeveloper

This is my first time connecting to an Oracle server. I'm using SQL Developer. They only gave me an IP, the default port (1521), a user name and a password. So I filled them in in the "New / Select Database Connection" dialog.
When pressing "Test", I wait for a while, then I get the following:

Status: Failure -Test failed: IO Error: The Network Adapter could not establish the connection

It's possible I don't know what information to ask more from them or they are sending me incomplete information. The first time I asked they only sent me credentials, and when I asked for their server's host, they provided me with a LAN IP (192.168…) when they should know I'm not accessing it from inside their network.

They also sent a "Database name" which I then tried filling in as well (in the "Service name" field, then as the SID, thinking that might be the missing piece, but I always get the same error.

EDIT: I asked them to allow public access from my IP through their firewall, but maybe they didn't understand what I asked, or I'm doing something wrong.

How should I request access from them so that they send me something I can use to connect to their Oracle server? Or how can I troubleshoot / verify access?

Best Answer

The error The Network Adapter could not establish the connection means probably that you don't have connectivity to that TCP port. Verify with:

telnet   1.2.3.4    1521

If the screen waits for your input, you have connected. This means the TCP layer works. Else telnet will print an error. On newer Linux systems you could also use nc -v in the same vein.

Side note 1: If their DBAs have sent you a "Database Name", then it means they don't understand what's going on all too well (on a very basic level). They should tell you either SID or Service Name (not the same thing generally, although some people set it to identical value).

Side note 2: As the TCP starts working, the error message would likely become "doesn't know about service X". This means there is no such SID or no such Service Name (or a mismatch between those).