Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I was browsing the net to find a solution, but I had no luck. :(

How can I install Oracle's imp / exp binaries to my CentOS box without installing an Oracle Server? I'm accessing an existing Oracle database on another machine, so I only need a client here. I already installed sqlplus and its dependencies (oracle-instantclient11.2-basic-11.2.0.3.0-1.x86_64.rpm, and oracle-instantclient11.2-odbc-11.2.0.3.0-1.x86_64.rpm), but that didn't provide those tools.

Do I really need to fully install Oracle?

My aim is to suck a database dump from the Oracle to my CentOS box. If there is another way to do this without using exp I wouldn't feel bad about NOT using it, but it seems to me there is no alternative.

share|improve this question

3 Answers 3

up vote 5 down vote accepted

To get the export (exp) and import (imp) binaries, install the full Oracle Client, instead of the Instant Client or the full RDBMS. The 11gR2 Client is actually the 4th file of a 7 file set for the full RDBMS. The latest version is 11.2.0.3.0 (659,229,728 bytes, released in Q4 2011 - technically called a "patch set" but it is a complete install). It is not available for public download. (Only the obsolete 11.2.0.1.0 for Linux x86-64 is available publicly).

To download the full Oracle Client, follow these steps:

  1. Log in to My Oracle Support (MOS), formerly known as metalink.

  2. Click the "Patches & Updates" menu at the top.

  3. In the Patch Search section, click the Search tab.

  4. Enter 10404530 in the "Patch Name or Number" field. (10404530 is version 11.2.0.3.0)

  5. Also select a "Platform". (e.g., "Linux x86-64")

  6. Click Search.

  7. In the search results, click on the patch number to display the details or click Download - assuming your MOS account has been given download privileges.

The file name for the client-only download is "p10404530_112030_platform_4of7.zip" (where platform is "Linux-x86-64" for example).

NOTE: exports/dumps are not true backups. They are only logical copies of the database. The meta-data and indexes get re-created during import and so won't be byte-for-byte identical to the source database.

share|improve this answer

You want to import a database without DBMS system in place, sorry, but this is impossible in every definition of the word...

So, yes, you have to do full Oracle install before imp and exp will work.

Also, in the future I'd suggest using expdp and impdp instead.

share|improve this answer
2  
What Sotapanna wants to do is to run exp/imp commands on a machine that is not the DBMS server. Since exp/imp can connect across the network, it should be plausible that you can install these commands without installing the full Oracle RDBMS server package, presumably with some oracle-client package. If Sotapanna isn't finding a suitable package, the problem seems to have more to do with Oracle's packaging decisions for RHEL/CentOS than any technical limitation. –  cjc Nov 24 '11 at 15:28

Here is how I did it. Had to hack it.

a) Download Oracle 11.2 XE for Linux 64 in your $HOME
b) Unzip the zip file you get
c) Unpack the content of the rpm file without installing it (we don't need the Oracle RDBMS to be running on the server)
    mkdir ~/Oracle11XE-binaries
    cd ~/Oracle11XE-binaries

    # extract all the binaries from the RPM (rather than installing the RPM)
    rpm2cpio ../Disk1/oracle-xe-11.2.0-1.0.x86_64.rpm  | cpio -idmv

    sudo mkdir /opt/oracle
    sudo mv u01/app/oracle/product /opt/oracle

    # clean up downloaded and extracted files (they are BIG)
    cd
    rm -rf Disk1 oracle-xe-11.2.0-1.0.x86_64.rpm.zip

    echo 'export ORACLE_HOME=/opt/oracle/product/11.2.0/xe
    export PATH=$PATH:$ORACLE_HOME/bin
    export LD_LIBRARY_PATH=$ORACLE_HOME/lib
    export TNS_ADMIN=$ORACLE_HOME/network/admin' | sudo tee /etc/profile.d/oracle.sh

    # source it so it takes effect in the current session
    . /etc/profile.d/oracle.sh

    # now you can run imp and exp
    $ imp

    Import: Release 11.2.0.2.0 - Production on Mon Aug 4 14:39:39 2014

    Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

Username:

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.