Install Oracle Client 12c ((free))

Installing Oracle Client 12c: A Step-by-Step Guide

Oracle Client 12c is a software component that allows users to connect to Oracle databases from their local machines. It provides a set of libraries and tools that enable applications to interact with Oracle databases, making it a crucial component for any organization that relies on Oracle databases. In this article, we will walk you through the process of installing Oracle Client 12c on your machine.

Prerequisites for Installing Oracle Client 12c

Before you begin the installation process, ensure that your machine meets the following prerequisites:

Downloading Oracle Client 12c

To install Oracle Client 12c, you need to download the installation files from the Oracle website. Here's how: install oracle client 12c

  1. Go to the Oracle Technology Network (OTN) website (https://www.oracle.com/technetwork/database/technologies/oracle-database-software-downloads.html).
  2. Click on the "Oracle Database 12c" section.
  3. Click on the "Oracle Client" link.
  4. Select the correct operating system and architecture (32-bit or 64-bit) for your machine.
  5. Click on the "Download" button to download the installation files.

Installing Oracle Client 12c on Windows

Here's how to install Oracle Client 12c on a Windows machine:

  1. Run the Installer: Extract the downloaded files to a directory on your machine (e.g., C:\oracle\client\12c).
  2. Launch the Installer: Navigate to the extracted directory and run the setup.exe file.
  3. Welcome Screen: The Oracle Client 12c installer will launch. Click on the "Next" button to proceed.
  4. Select Installation Type: Choose the "Administrator" installation type and click on the "Next" button.
  5. Select Installation Location: Choose a location for the Oracle Client 12c installation (e.g., C:\oracle\client\12c) and click on the "Next" button.
  6. Select Oracle Home: Choose an Oracle Home directory (e.g., C:\oracle\client\12c\oraInventory) and click on the "Next" button.
  7. Summary: Review the installation summary and click on the "Install" button to begin the installation process.
  8. Installation Progress: The installer will copy files, configure the Oracle Client, and perform other installation tasks. This may take several minutes to complete.
  9. Completing the Installation: Once the installation is complete, click on the "Finish" button to exit the installer.

Installing Oracle Client 12c on Linux

Here's how to install Oracle Client 12c on a Linux machine:

  1. Extract the Files: Extract the downloaded files to a directory on your machine (e.g., /opt/oracle/client/12c).
  2. Run the Installer: Navigate to the extracted directory and run the ./runInstaller file.
  3. Welcome Screen: The Oracle Client 12c installer will launch. Click on the "Next" button to proceed.
  4. Select Installation Type: Choose the "Administrator" installation type and click on the "Next" button.
  5. Select Installation Location: Choose a location for the Oracle Client 12c installation (e.g., /opt/oracle/client/12c) and click on the "Next" button.
  6. Select Oracle Home: Choose an Oracle Home directory (e.g., /opt/oracle/client/12c/oraInventory) and click on the "Next" button.
  7. Summary: Review the installation summary and click on the "Install" button to begin the installation process.
  8. Installation Progress: The installer will copy files, configure the Oracle Client, and perform other installation tasks. This may take several minutes to complete.
  9. Completing the Installation: Once the installation is complete, click on the "Finish" button to exit the installer.

Configuring Oracle Client 12c

After installing Oracle Client 12c, you need to configure it to connect to your Oracle database. Here's how:

  1. Set the ORACLE_HOME Environment Variable: Set the ORACLE_HOME environment variable to the Oracle Client 12c installation directory (e.g., C:\oracle\client\12c on Windows or /opt/oracle/client/12c on Linux).
  2. Set the TNS_ADMIN Environment Variable: Set the TNS_ADMIN environment variable to the directory where your tnsnames.ora file is located (e.g., C:\oracle\client\12c\network\admin on Windows or /opt/oracle/client/12c/network/admin on Linux).
  3. Create a tnsnames.ora File: Create a tnsnames.ora file in the specified directory with the following format:
<alias> =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = <host>)(PORT = <port>))
    )
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = <service_name>)
    )
  )

Replace <alias>, <host>, <port>, and <service_name> with your Oracle database details.

Testing the Oracle Client 12c Connection

To test the Oracle Client 12c connection, use a tool like SQLPlus or a third-party tool like Toad or SQL Developer. Here's how to test using SQLPlus:

  1. Launch SQL*Plus: Launch SQL*Plus from the command line or terminal.
  2. Connect to the Database: Connect to the database using the following command:
sqlplus <username>/<password>@<alias>

Replace <username>, <password>, and <alias> with your Oracle database credentials and alias. Installing Oracle Client 12c: A Step-by-Step Guide Oracle

Conclusion

In this article, we walked you through the process of installing Oracle Client 12c on Windows and Linux machines. We also covered the configuration and testing of the Oracle Client 12c connection. By following these steps, you should be able to successfully install and configure Oracle Client 12c to connect to your Oracle database. If you encounter any issues during the installation or configuration process, refer to the Oracle documentation or seek help from an Oracle expert.

Post-install configuration

  1. Environment variables:
    • ORACLE_HOME — path to client installation.
    • PATH — include ORACLE_HOME/bin.
    • LD_LIBRARY_PATH (Linux) — include ORACLE_HOME/lib or instantclient directory (or configure /etc/ld.so.conf.d/ and run ldconfig).
    • TNS_ADMIN — optional path where tnsnames.ora and sqlnet.ora are located.
  2. tnsnames.ora: Add connect descriptors for target databases: Example:
    MYDB =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = dbhost.example.com)(PORT = 1521))
        (CONNECT_DATA =
          (SERVICE_NAME = orcl.example.com)
        )
      )
    
  3. sqlnet.ora: Configure naming methods, timezone, encryption as needed.
  4. Listener is configured on server side; client only needs correct connect descriptor.

Error 5: Installation hangs at 84% or "Linking Phase"

Fix: This often indicates missing system libraries or insufficient memory. On Linux, verify all pre-requisite packages are installed. Increase swap space temporarily:

dd if=/dev/zero of=/swapfile bs=1M count=2048
mkswap /swapfile
swapon /swapfile

Prerequisites

5.1 Locate the tnsnames.ora file

(If the ADMIN folder doesn't exist, create it manually).

Linux-specific

4.2. Installation Type

Select Administrator.

Beyond the Jargon: A Deep Dive into Installing Oracle Instant Client 12c

Published by: SysAdmin Archives Tags: Oracle, DevOps, Legacy Systems, Linux, Database Connectivity