如何安裝 Oracle 的 exp/imp 二進位文件

如何安裝 Oracle 的 exp/imp 二進位文件

我正在瀏覽網路尋找解決方案,但沒有運氣。 :(

如何在不安裝 Oracle 伺服器的情況下將Oracle 的imp/二進位檔案安裝到我的 CentOS 機器上?exp我正在存取另一台電腦上現有的 Oracle 資料庫,因此我這裡只需要一個客戶端。我已經安裝了sqlplus及其依賴項(oracle-instantclient11.2-basic-11.2.0.3.0-1.x86_64.rpm、 和oracle-instantclient11.2-odbc-11.2.0.3.0-1.x86_64.rpm),但沒有提供這些工具。

我真的需要完全安裝 Oracle 嗎?

我的目標是將資料庫轉儲從 Oracle 轉移到我的 CentOS 機器上。如果有另一種方法可以在不使用它的情況下做到這一點,exp我不會因為不使用它而感到難過,但在我看來,沒有其他選擇。

答案1

若要取得匯出 (exp) 和匯入 (imp) 二進位文件,請安裝滿的Oracle 用戶端,而不是即時用戶端或完整的 RDBMS。 11gR2 用戶端實際上是完整 RDBMS 的 7 個文件集中的第 4 個檔案。最新版本是 11.2.0.3.0(659,229,728 字節,2011 年第四季度發布 - 技術上稱為“補丁集”,但它是完整安裝)。它不可供公眾下載。 (僅適用於 Linux x86-64 的過時 11.2.0.1.0 是公開可用的)。

若要下載完整的 Oracle 用戶端,請依照下列步驟操作:

  1. 登入我的 Oracle 支持(MOS),以前稱為metalink。

  2. 點擊頂部的“補丁和更新”選單。

  3. 在「補丁搜尋」部分中,按一下「搜尋」標籤。

  4. 在「補丁名稱或編號」欄位中輸​​入 13390677。 (13390677 是版本 11.2.0.4.0)

  5. 還要選擇一個「平台」。 (例如,「Linux x86-64」)

  6. 點選搜尋。

  7. 在搜尋結果中,按一下補丁號以顯示詳細資訊或按一下「下載」 - 假設您的 MOS 帳戶已被授予下載權限。

僅客戶端下載的檔案名稱是「p13390677_112040_平台_4of7.zip」(其中平台例如“Linux-x86-64”)。

注意:出口/轉儲是不是真正的備份。他們只是邏輯的資料庫的副本。元資料和索引在導入期間重新創建,因此不會與來源資料庫逐字節相同。

答案2

我是這樣做的。不得不破解它。

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.

使用者名稱:

答案3

您不需要完全安裝 Oracle 實例。

  1. 依中所述下載 Oracle 用戶端喬治3的回答
  2. 安裝 - 當它要求您選擇Instant ClientRuntimeAdministratorCustom< 時 - 選擇“自訂”。
  3. 選擇Database Utilities。這包含 exp/imp 文件

答案4

您想要在沒有 DBMS 系統的情況下導入資料庫,抱歉,但這在該詞的每個定義中都是不可能的...

所以,是的,您必須先進行完整的 Oracle 安裝imp才能exp運作。

另外,將來我建議使用expdpandimpdp代替。

相關內容