Data_Pump


Oracle

Directory定義

sqlplus等から、

create directory importdir as 'C:\xxx\y\zzz';

既にdefされているときは、

drop directory importdir;

Directory確認

select * from dba_directories;

Export(Oracle => DumpFile?)

コマンドライン上で、下記実行

expdp (username) tables=(schemaname).(tablename) directory=(dumpdatadirectory) dumpfile=(dumpfilename).dmp

Example:

expdp xxx tables=xxx.tmp_log directory=expdir dumpfile=fname.dmp

Import (impdp) するために必要な情報:

  • user/schema名
  • table名
  • table space名
  • dmpファイル名

その他注意:

  • FTP転送モードは、Binaryで(Asciiは不可)。

Import(Dumpfile => Oracle)

コマンドライン上で、下記実行

impdp (username)/(passwd) tables=(schemaname).(tablename) directory=(dumpdatadirectory)
 dumpfile=(dumpfilename).dmp logfile=(logfiledir) remap_schema=(old_schemaname):(new_schemaname)
 remap_tablespace=(old_tablespacename):(new_tablespacename)