AI Math SolverPricing
Login

Install Oracle Client 12c -

sudo groupadd oinstall
sudo groupadd dba
sudo useradd -g oinstall -G dba oracle
sudo passwd oracle

Since 12c is legacy, you may need Oracle Support credentials. Download these three packages:

| Issue | Solution | |----------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------| | ORA-12154: TNS:could not resolve | Check TNS_ADMIN environment variable; ensure tnsnames.ora syntax is correct. | | ORA-12514: TNS listener does not know service | Verify database service name with lsnrctl services on DB server. | | sqlplus: command not found | ORACLE_HOME/bin not in PATH. | | DLL load failed (Windows) | Install Visual C++ Redistributables (2013 and 2017). | | libaio.so.1: cannot open shared object (Linux) | yum install libaio | | Inventory conflict | Delete /u01/app/oraInventory or use -invPtrLoc flag to point to another inventory location. |


Windows:

Linux:

$ORACLE_HOME/deinstall/deinstall

After deinstall, remove the Oracle home directory. install oracle client 12c


pip install cx_Oracle

Set LD_LIBRARY_PATH (Linux) or PATH (Windows) to point to ORACLE_HOME/bin.

Fix: Download and install the correct VC++ Redistributable (2013, 2015-2022) from Microsoft. Oracle 12c requires the 2013 Redistributable. sudo groupadd oinstall sudo groupadd dba sudo useradd

Add to /etc/profile.d/oracle.sh (system-wide) or your app user’s .bashrc:

export ORACLE_HOME=/opt/oracle/instantclient_12_2
export LD_LIBRARY_PATH=$ORACLE_HOME:$LD_LIBRARY_PATH
export PATH=$ORACLE_HOME:$PATH
export TNS_ADMIN=$ORACLE_HOME/network/admin   # For tnsnames.ora
export NLS_LANG=AMERICAN_AMERICA.AL32UTF8    # Prevents character set errors
export SQLPATH=$ORACLE_HOME

The TNS_ADMIN nuance: If you don’t set this, sqlplus expects tnsnames.ora in $ORACLE_HOME/network/admin. Without the directory, it fails silently. Since 12c is legacy, you may need Oracle Support credentials

Create the directory:

sudo mkdir -p $ORACLE_HOME/network/admin