Oracle用imp和exp實現資料的匯入和匯出

來源:互聯網
上載者:User

 Imp和Exp
命令詳解:

Exp

匯出
模式:

Full模式--- 匯出
整個資料庫User模式--- 匯出
指定的使用者Table模式— 匯出
指定的
Tablespace模式— 匯出

空間 Exp

匯出
參數:

OWNER指定要 匯出
的使用者列表FULL=y表示要 匯出
整個資料庫Tables指定要 匯出

Tablepaces指定要 匯出

空間ROWS=y表示 匯出

資料
,否則只 匯出

的結構.HELP=Y表示要擷取協助Indexs指定是否 匯出
索引Grants表示是否 匯出
授權QUERY指定查詢條件,允許使用者 匯出

的一部分 資料
Triggers指定是否 匯出
觸發器 1.Full
模式:把資料庫orcl完全 匯出
到D:/pafirc.dmp中, exp
system/pafirc@orcl file=e:/ pafirc.dmp full=y 2.User
模式:把system,pafirc使用者的
匯出
到D:/pafirc.dmp中, exp
pafirc/pafirc@orcl file=e:/ pafirc.dmp owner=(system, pafirc) 3.Table
模式:
tab_proj 匯出
到D:/pafirc.dmp中, exp
pafirc/pafirc@orcl file=e:/ pafirc.dmp tables=(tab_proj) 4.
備份
中的部分資料

tab_proj中的欄位budget小於500000 資料
匯出
到D:/pafirc.dmp中, exp
pafirc/pafirc@orcl file=e:/ pafirc.dmp tables=(tab_proj) query=/" where budget<500000/"如:clip_image014 Imp
命令資料
的匯入
類似 exp
,只要把 exp
換成imp就可以,如果匯入成功,會有下面的提示:clip_image016clip_image018 三.建立使用者及授權1.建立使用者:CREATE USER PAFIRCIDENTIFIED BY PAFIRCDEFAULT TABLESPACE USERSTEMPORARY TABLESPACE TEMP;2.授予使用者權限GRANT DBA TO PAFIRC WITH ADMIN OPTION;GRANT CONNECT TO PAFIRC WITH ADMIN OPTION;GRANT RESOURCE TO PAFIRC WITH ADMIN OPTION;GRANT DBA TO PAFIRC WITH ADMIN OPTION;ALTER USER PAFIRC DEFAULT ROLE DBA,CONNECT,RESOURCE;

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.