Connect to oracle 11 on a corporate network via oracle developer 17

oracleoracle-11goracle-sql-developerplsql-developer

Sorry for this absolute oracle noob question:

I am in an environment that uses integrated / active directory authentication, for developer to access the oracle databases via an old version 9 PL/SQL Developer:

enter image description here

Clicking OK gets me into the dababase

I am trying to connect to the same database via Oracle SQL Developer 17 and the login screen is more complicated:
enter image description here

What do I enter here? I've searched far and wide but there are few resources for an oracle noob like me.

Best Answer

PL/SQL Developer can only connect to an Oracle database using what's known as a TNS Alias.

This is defined a file called "tnsnames.ora" that contains some text something a bit like this (shamelessly stolen from @Balazs's answer):

EDBDEV =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = edbdev.mycompany.com)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = EDBDEV)
    )
  )

This allows administrators to define database names and "hide" the IP address/service name details from end users. They say "connect to EDBDEV" and that's all you need to know.

The location of this file is defined by the variable "TNS_ADMIN". On a Linux system you'd find this by typing:

echo $TNS_ADMIN

On a Windows box you can find it by opening the command prompt and typing:

echo %TNS_ADMIN%

In SQL Developer, you can change the "Connection type" box to "TNS", and it will present you with a list of the TNS Aliases that it knows about - e.g. those that it found in the file:

%TNS_ADMIN%\tnsnames.ora

If for some reason you need to override this location, you can set the location of the TNSNames.ora file manually in the preferences:

Tools / Preferences / Database / Advanced