[Oracle]expdb and impdb
查詢資料夾位置
SELECT directory_path FROM dba_directories WHERE directory_name = 'DATA_PUMP_DIR'
匯出資料表
expdp user/user directory=DATA_PUMP_DIR dumpfile=LOCATORS.dmp tables=USER.LOCATOR LOGFILE=LOCATOR.log
複製到另一台機器
copy \\server\dpdump\LOCATOR.DMP C:\app\Administrator\admin\database1\dpdump
匯入資料表
impdp user/user directory=DATA_PUMP_DIR dumpfile=LOCATOR.dmp LOGFILE=LOCATOR.log table_exists_action=replace
出現
ORA-39151: 表格 "USER"."LOCATOR" 已經存在. 因為略過的 table_exists_action, 所以將會略過所有相依描述資料和資料.
是因為table_exists_action 預設是 skip