Oracle exp/imp匯出匯入工具的使用-1,expimp

來源:互聯網
上載者:User

Oracle exp/imp匯出匯入工具的使用-1,expimp

exp匯出工具將資料庫中資料備份壓縮成一個二進位系統檔案.可以在不同OS間遷移

imp匯入工具將EXP形成的二進位系統檔案匯入到資料庫中.

一. 匯出工具 exp

它有三種模式:

a. 使用者模式: 匯出使用者所有對象以及對象中的資料;

b. 表模式: 匯出使用者所有表或者指定的表;

c. 整個資料庫: 匯出資料庫中所有對象。

$exp oa1/123@oracle file=D:/all.dmp grants=y

說明:把oa1使用者的所有表匯出到檔案D:/all.dmp

$exp oa1/123@oracle tables=(pfdept,pfuser) file=D:/all.dmp grants=y

說明:把oa1使用者裡兩個表emp,dept匯出到檔案D:/all.dmp

$exp oa1/123@oracle tables=pfdept query="where predeptid=0745" file=D:/all.dmp

說明:在exp裡面加上匯出pfdept 的查詢條件predeptid=0745

$exp parfile=username.par file=/directory1/username_1.dmp,/directory1/username_2.dmp filesize=2000M log=/directory2/username_exp.log

二.匯入工具 imp

有三種模式:

a. 使用者模式: 匯出使用者所有對象以及對象中的資料;

b. 表模式: 匯出使用者所有表或者指定的表;

c. 整個資料庫: 匯出資料庫中所有對象。

$ imp system/oracle fromuser=oa1 tables=(pfdept)

$ imp system/oracle fromuser=oa1 tables=(pfdept,pfuser)

$ imp system/oracle fromuser=oa1 touser=system

$ imp oa1/123 file = all.dmp full=y

$ imp oa1/123 file = all.dmp show=n buffer=2048000 ignore=n commit=y grants=y full=y log=D:/.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.