At the first time startup of PL/SQL developer, you may want to new a connection to start to use the tool. But sometimes, you might see that there's no TNS entries from the drop-down menu in Oracle logon dialog.
Furthermore, you saw an alert window was thrown if you insisted to make the connection.
Initialization error
Oracle Client not properly installed
OracleHomeKey:
OracleHomeDir:
Rationale
Normally, it's because that there's no ORACLE_HOME environment variable has been set in your operating system, so PL/SQL developer has no way to find a proper tnsnames.ora to use.
This could happen when you use Oracle instant client as your connection base in this machine.
Solutions
There're 2 ways to solve it.
No matter which way you want to do, please make sure that there's a valid tnsnames.ora file under %ORACLE_HOME%/network/admin. Still, if there's no content in tnsnames.ora, then you see no TNS in the drop-down menu.
Set ORACLE_HOME in Operating System
To solve it, you can simply set ORACLE_HOME path in your environment. Here we use the instant client home as our ORACLE_HOME.
Click OK to make it take effect, then close the program, re-open PL/SQL developer.
Set OCI Library in PL/SQL Developer
To make ORACLE_HOME work in PL/SQL developer, we should go for the function menu "Tools" > "Preferences".
Next, we expand "Oracle" category and click on "Connection" item. Here we set Oracle OCI library path in the field instead of setting Oracle Home.
In fact, the first field for Oracle Home actually asks you for ORACLE_HOME_NAME, the name of Oracle Home, not the path. For instant client, there's no name for Oracle home.
A valid ORACLE_HOME_NAME looks like, for example, OraClient11G_Home1, OraClient12Home1 or OraClient19Home1.
If everything looks good, please click OK to confirm all settings, then restart the program, PL/SQL developer.
It should be all right now.