How to Install Oracle exp/imp Utilities on CentOS Without Full Oracle Server Installation


4 views

Many developers face this exact scenario: needing Oracle's export/import utilities (exp/imp) for database operations while avoiding the overhead of a full Oracle Server installation. The traditional approach of installing the complete Oracle Database just to get these utilities is unnecessarily resource-intensive.

You actually only need the Oracle Instant Client with the SQL*Plus and Tools packages. Here's the complete solution:

# For CentOS/RHEL 7/8:
wget https://download.oracle.com/otn_software/linux/instantclient/19600/oracle-instantclient19.6-basic-19.6.0.0.0-1.x86_64.rpm
wget https://download.oracle.com/otn_software/linux/instantclient/19600/oracle-instantclient19.6-sqlplus-19.6.0.0.0-1.x86_64.rpm
wget https://download.oracle.com/otn_software/linux/instantclient/19600/oracle-instantclient19.6-tools-19.6.0.0.0-1.x86_64.rpm

sudo yum install -y oracle-instantclient19.6-*.rpm

After installation, set these environment variables in your ~/.bashrc:

export ORACLE_HOME=/usr/lib/oracle/19.6/client64
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export PATH=$PATH:$ORACLE_HOME/bin

Test your setup with:

exp help=y
imp help=y

This should display the help information for both utilities, confirming they're properly installed.

For newer Oracle versions, consider using Data Pump utilities (expdp/impdp) which require slightly different packages:

wget https://download.oracle.com/otn_software/linux/instantclient/19600/oracle-instantclient19.6-precomp-19.6.0.0.0-1.x86_64.rpm

Here's how to perform a basic export operation:

exp username/password@//remote-db:1521/SID file=export.dmp log=export.log owner=SCHEMA_NAME

If you encounter library errors, ensure all dependencies are satisfied:

sudo yum install -y libaio

For connection issues, verify your TNS configuration in $ORACLE_HOME/network/admin/tnsnames.ora


Many DBAs and developers encounter this exact scenario: You need Oracle's traditional export (exp) and import (imp) utilities for database migration or backup purposes, but don't want to install the full Oracle Database Server. This is particularly common when:

  • Migrating data between environments
  • Creating lightweight development setups
  • Working with remote Oracle databases

While you've already installed the basic Instant Client packages, the exp/imp utilities require additional components. Here's what you're missing:

oracle-instantclient11.2-tools-11.2.0.3.0-1.x86_64.rpm
oracle-instantclient11.2-sqlplus-11.2.0.3.0-1.x86_64.rpm

Here's how to properly set up your CentOS system:

# Install required RPMs
sudo yum install oracle-instantclient11.2-basic-11.2.0.3.0-1.x86_64.rpm
sudo yum install oracle-instantclient11.2-tools-11.2.0.3.0-1.x86_64.rpm
sudo yum install oracle-instantclient11.2-sqlplus-11.2.0.3.0-1.x86_64.rpm

# Set environment variables
echo 'export ORACLE_HOME=/usr/lib/oracle/11.2/client64' >> ~/.bashrc
echo 'export LD_LIBRARY_PATH=$ORACLE_HOME/lib' >> ~/.bashrc
echo 'export PATH=$PATH:$ORACLE_HOME/bin' >> ~/.bashrc
source ~/.bashrc

If you prefer not to use exp/imp, consider these alternatives:

  1. SQL Developer: Oracle's graphical tool with export functionality
  2. Data Pump (expdp/impdp): More modern alternative (requires additional packages)
  3. Third-party tools: Like Toad or DbVisualizer

Some frequent problems and their solutions:

Error Solution
"exp: command not found" Verify PATH includes ORACLE_HOME/bin
Library loading errors Check LD_LIBRARY_PATH configuration
Version mismatches Ensure client version matches server

Basic usage examples:

# Export entire schema
exp username/password@remote_db file=export.dmp log=export.log owner=schema_owner

# Import with remapping
imp username/password@remote_db file=export.dmp log=import.log fromuser=source_schema touser=target_schema

For large databases:

  • Use DIRECT=Y parameter for faster exports
  • Set BUFFER and RECORDLENGTH parameters appropriately
  • Consider splitting large exports into multiple files