expdp利用表導出無規則的表和其它的信息
阿新 • • 發佈:2018-09-19
dmp object view 查詢 ack flashback trigger ble div 例如需要導入如下的一些表:
EX_ARC_EMPE
EX_ARC_LOC_PTY
EX_ARC_LOC_PTY_CHG
EX_ARC_LOC_PTY_CHG_DTL
EX_ARC_POST
EX_ARC_STORAGE_DIV
EX_MG_DIV_DB
新建一張表:
-- Create table
create table SYSTEM.EXP_TABLE
(table_name VARCHAR2(100));
把以上的表插入到新建的exp_table 表中,註意表的名稱一定要大寫。
directory = ORABACKUP
schemas=appuser
include=table:"in(select table_name from system.exp_table)"
include=FUNCTION
include=PROCEDURE
include=view
include=TRIGGER
include=SEQUENCE
include=SYNONYM
flashback_scn=92017402375
執行導出:
expdp system/password parfile=fex.sh
include參數具體查詢 DATABASE_EXPORT_OBJECTS視圖:
SELECT * FROM database_export_objects
其中named為Y的表示可以直接添加到include當中:
94 DB_LINK Private and public database links Y
可以寫作:
include=DB_LINK
從中可以選擇expdp備份表、存儲過程、視圖、觸發器、sequence等。
EX_ARC_EMPE
EX_ARC_LOC_PTY
EX_ARC_LOC_PTY_CHG
EX_ARC_LOC_PTY_CHG_DTL
EX_ARC_POST
EX_ARC_STORAGE_DIV
EX_MG_DIV_DB
-- Create table
create table SYSTEM.EXP_TABLE
(table_name VARCHAR2(100));
編寫parfile文件:
$ cat fex.sh
dumpfile = chunqiu.dmp
logfile = chunqiu.log
schemas=appuser
include=table:"in(select table_name from system.exp_table)"
include=FUNCTION
include=PROCEDURE
include=view
include=TRIGGER
include=SEQUENCE
include=SYNONYM
flashback_scn=92017402375
expdp system/password parfile=fex.sh
其中named為Y的表示可以直接添加到include當中:
94 DB_LINK Private and public database links Y
可以寫作:
include=DB_LINK
從中可以選擇expdp備份表、存儲過程、視圖、觸發器、sequence等。
expdp利用表導出無規則的表和其它的信息