Oracle/下位バージョンへのデータ移行
DataPump(expdp/impdp)を使って下位バージョン(例えば11gR2→10gR2)にデータを移行する際には、パラメータとしてバージョンの指定が必要になります。
パラメータを指定しないで11g R2で取得したexpdpのダンプファイルを10g R2でimpdpすると下記のようにエラーが表示されます。
$ impdp xxxxx/xxxxx directory=EXPDP_DIR dumpfile=xxxxx.expdp.dump logfile=EXPDP_DIR:xxxxx.log job_name=job_impdp1 Import: Release 10.2.0.3.0 - Production on 火曜日, 02 7月, 2013 13:22:52 Copyright (c) 2003, 2005, Oracle. All rights reserved. 接続先: Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Production With the Partitioning, OLAP and Data Mining options ORA-39001: 引数値が無効です ORA-39000: ダンプ・ファイル指定が無効です ORA-39142: 互換性のないバージョン番号3.1が、ダンプ・ファイル"/opt/oracle/oradata/expdp/xxxxx.expdp.dump"内にあります
これを回避するにはexpdpの際にVERSIONオプションを指定すればOKです。
$ expdp xxxxx/xxxxx directory=DUMPDIR dumpfile=xxxxx.expdp.dump logfile=DUMPDIR:20130702_xxxxx.log job_name=job_expdp1 VERSION=10.2.0
あとはこのダンプファイルをimpdpすると問題なくインポートできます。
このページのURL: