Skip to content
Home » Oracle » PL/SQL Developer Initialization error, Oracle Client not properly installed

PL/SQL Developer Initialization error, Oracle Client not properly installed

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.

PL/SQL Developer - No TNS from Drop-down Menu
PL/SQL Developer - No TNS from Drop-down Menu

Furthermore, you saw an alert window was thrown if you insisted to make the connection.

PL/SQL Developer - Initialization error, Oracle Client not properly installed
PL/SQL Developer - Initialization error, Oracle Client not properly installed
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.

  1. Set ORACLE_HOME in Operating System
  2. Set OCI Library in PL/SQL Developer

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.

Environment Variable Editor - Set ORACLE_HOME
Environment Variable Editor - Set 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".

PL/SQL Developer - Tools > Preferences
PL/SQL Developer - 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.

PL/SQL Developer - Preferences - OCI Library Path
PL/SQL Developer - Preferences - OCI Library Path

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.

Leave a Reply

Your email address will not be published. Required fields are marked *