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:
- Operating System: Oracle Client 12c supports various operating systems, including Windows, Linux, and Unix. Ensure that your machine is running a supported operating system.
- Hardware Requirements: Ensure that your machine has sufficient disk space (at least 1.5 GB) and RAM (at least 1 GB).
- Oracle Database: Ensure that you have access to an Oracle database (version 12c or later) that you want to connect to using Oracle Client 12c.
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
- Go to the Oracle Technology Network (OTN) website (https://www.oracle.com/technetwork/database/technologies/oracle-database-software-downloads.html).
- Click on the "Oracle Database 12c" section.
- Click on the "Oracle Client" link.
- Select the correct operating system and architecture (32-bit or 64-bit) for your machine.
- 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:
- Run the Installer: Extract the downloaded files to a directory on your machine (e.g.,
C:\oracle\client\12c). - Launch the Installer: Navigate to the extracted directory and run the
setup.exefile. - Welcome Screen: The Oracle Client 12c installer will launch. Click on the "Next" button to proceed.
- Select Installation Type: Choose the "Administrator" installation type and click on the "Next" button.
- Select Installation Location: Choose a location for the Oracle Client 12c installation (e.g.,
C:\oracle\client\12c) and click on the "Next" button. - Select Oracle Home: Choose an Oracle Home directory (e.g.,
C:\oracle\client\12c\oraInventory) and click on the "Next" button. - Summary: Review the installation summary and click on the "Install" button to begin the installation process.
- Installation Progress: The installer will copy files, configure the Oracle Client, and perform other installation tasks. This may take several minutes to complete.
- 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:
- Extract the Files: Extract the downloaded files to a directory on your machine (e.g.,
/opt/oracle/client/12c). - Run the Installer: Navigate to the extracted directory and run the
./runInstallerfile. - Welcome Screen: The Oracle Client 12c installer will launch. Click on the "Next" button to proceed.
- Select Installation Type: Choose the "Administrator" installation type and click on the "Next" button.
- Select Installation Location: Choose a location for the Oracle Client 12c installation (e.g.,
/opt/oracle/client/12c) and click on the "Next" button. - Select Oracle Home: Choose an Oracle Home directory (e.g.,
/opt/oracle/client/12c/oraInventory) and click on the "Next" button. - Summary: Review the installation summary and click on the "Install" button to begin the installation process.
- Installation Progress: The installer will copy files, configure the Oracle Client, and perform other installation tasks. This may take several minutes to complete.
- 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:
- Set the ORACLE_HOME Environment Variable: Set the
ORACLE_HOMEenvironment variable to the Oracle Client 12c installation directory (e.g.,C:\oracle\client\12con Windows or/opt/oracle/client/12con Linux). - Set the TNS_ADMIN Environment Variable: Set the
TNS_ADMINenvironment variable to the directory where yourtnsnames.orafile is located (e.g.,C:\oracle\client\12c\network\adminon Windows or/opt/oracle/client/12c/network/adminon Linux). - Create a tnsnames.ora File: Create a
tnsnames.orafile 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:
- Launch SQL*Plus: Launch SQL*Plus from the command line or terminal.
- 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
- 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.
- 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) ) ) - sqlnet.ora: Configure naming methods, timezone, encryption as needed.
- 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
- Linux x86_64 (RHEL/CentOS 6/7, OEL 6/7) or Windows (64-bit)
- Minimum 2GB RAM, 500MB disk space
- Root/sudo access for installation
5.1 Locate the tnsnames.ora file
- Windows:
%ORACLE_HOME%\NETWORK\ADMIN\ - Linux:
$ORACLE_HOME/network/admin/
(If the ADMIN folder doesn't exist, create it manually).
Linux-specific
- Required packages (example for RHEL 7):
yum install binutils gcc gcc-c++ glibc libaio libgcc libstdc++ make sysstat - Kernel parameters: Check
/etc/sysctl.conf(Oracle provides a template during install).
4.2. Installation Type
- Administrator (most common) – installs
sqlplus,tnsping, libraries, and network config tools. - Runtime – libraries only (no
sqlplus). - Instant Client – (skip; that's a separate ZIP).
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