*該匯入匯出方式完全適用於分割槽表*
注:使用sys、system等系統使用者操作!
1)建立directory目錄物件
create directory exp_dir as
'/oracle/db/zone';
--存放dmp、log檔案
2)為使使用者user_local授權該目錄
grant
read, write
on directory exp_dir to user_local;
1:本地匯出
1)匯出指定表
expdp user_local/user_local directory=exp_dir dumpfile=tab.dmp logfile=tab.log tables=user_office
--tables=表1,表2,表3等
2)匯出整庫(方案)
expdp user_local/user_local directory=exp_dir dumpfile=tab.dmp logfile=tab.log schemas=user_local
--schemas=使用者(所有可操作表等)
3)匯出全庫
expdp system/orcl directory=exp_dir dumpfile=tab.dmp logfile=tab.log full=y
2:本地匯入
1)匯入指定表
2)匯入整庫(方案)
impdp user_local/user_local directory=exp_dir dumpfile=tab.dmp logfile=tab.log schemas=user_local
3)匯入全庫
impdp system/orcl directory=exp_dir dumpfile=tab.dmp logfile=tab.log full=y
1:說明
遠端資料庫資料匯入本地資料庫!
1)遠端資料庫:
ip:192.168.1.200
使用者名稱:user_remote
密碼:user_remote_
例項名:orcl
表空間:remote_space
2)本地資料庫:
使用者名稱:user_local
密碼:user_local
表空間:local_space
2:本地增加監聽(remote_orcl)
remote_orcl =(description =
(address_list =
(address = (protocol = tcp)(host = 192.168.1.200)(port = 1521))
) (connect_data =
(sid = orcl)
) )
create
database link source_db_link connect
to user_remote identified by user_remote_ using
'remote_orcl'
remote_orcl :上一步增加的監聽名
4:遠端庫表(user_office)匯入本地庫
tables=user_remote.user_office remap_schema=user_remote:user_local remap_tablespace=remote_space:local_space
oracle 資料幫浦匯入與資料幫浦匯出
資料幫浦匯入 指令 impdp 一 資料庫所有物件的匯入 impdp system tiger dumpfile pump dir mydatabase dat filesize 100m nologfile y job name zhang full y estimate only 二 使用者資料...
oracle 資料幫浦匯入匯出
sqlplus system system egov create directory dump dir as d dbback exit expdp system system egov directory dump dir dumpfile urbanyw.dmp schemas urbanyw...
oracle資料幫浦匯入匯出
使用expdp和impdp時應該注意的事項 exp和imp是客戶端工具程式,它們既可以在客戶端使用,也可以在服務端使用。expdp和impdp是服務端的工具程式,他們只能在oracle服務端使用,不能在客戶端使用。imp只適用於exp匯出的檔案,不適用於expdp匯出檔案 impdp只適用於expd...