oracle 資料泵expdp Impdp

來源:互聯網
上載者:User

資料泵匯出匯入與傳統匯出匯入的區別
在10g之前,傳統的匯出和匯入分別使用EXP工具和IMP工具,從10g開始,不僅保留了原有的EXP和IMP工具,還提供了資料泵匯出匯入工具EXPDP和IMPDP.使用EXPDP和IMPDP時應該注意的事項;
EXP和IMP是用戶端工具程式,它們既可以在用戶端使用,也可以在服務端使用.
EXPDP和IMPDP是服務端的工具程式,他們只能在ORACLE服務端使用,不能在用戶端使用
IMP只適用於EXP匯出檔案,不適用於EXPDP匯出檔案;IMPDP只適用於EXPDP匯出檔案,而不適用於EXP匯出檔案.

資料泵匯出包括匯出表,匯出方案,匯出資料表空間,匯出資料庫4種方式.

sqlplus sys/123456@orcl as sysdba                                                            
create directory bakdb as '/mnt/bak';
grant read,write on directory bakdb to test;

sqlplus test/123456@orcl
expdp test/123456@orcl directory=bakdb dumpfile=aa.dmp nologfile=y;
Impdp test/123456@orcl directory=bakdb dumpfile=aa.dmp nologfile=y;

(1)匯出表
       Expdp scott/tiger DIRECTORY=dump_dir DUMPFILE=tab.dmp TABLES=dept,emp logfile=exp.log;
 (2)匯出方案 (schema,與使用者對應)
       Expdp scott/tiger DIRECTORY=dump_dir DUMPFILE=schema.dmp SCHEMAS=system,scott logfile=/exp.log;
(3)匯出資料表空間
       Expdp system/manager DIRECTORY=dump_dir DUMPFILE=tablespace.dmp TABLESPACES=user01,user02 logfile=/exp.log;
(4)匯出資料庫
       Expdp system/manager DIRECTORY=dump_dir DUMPFILE=full.dmp FULL=Y logfile=/exp.log;

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.