geek.conf.2

あるエンジニアの備忘録

DATE PUMP!!

Oracle10g DBの新機能でダンプ・ファイル・セットと呼ばれる一連のオペレーティング・システム・ファイルにデータおよびメタデータをアンロードするためのユーティリティをData Pumpといいます。

従来使用されているバックアップユーティリティexport/importと比べると速くバックアップ/リストア
ができるようです。

さて、使い方を簡単にメモ。

1.expdumpを出力するディレクトリをOSとDBに作成

$mkdir /path/to/directory
$sqlplus "/as sysdba"

SQL >create or replace directory DIRECTRY as '/path/to/directory';


2.expdumpの実行

$expdp system/password directory=directory logfile=exp.log tablespaces=TABLE_SPACE_NAME

*表も表領域もDB全体もexpdumpできます。ここでは表領域を指定。
各オプションについては下記参照

Data Pump Export


3.impdpの実行

$impdp system/password directory=directory dumpfile=DUMP_FILE_NAME tablespace=TABLE_SPACE_NAME

おしまい