oracle 匯入匯出常用操作命令

來源:互聯網
上載者:User

  oracle  匯入匯出常用操作命令

 

該命令在“開始菜單>>運行>>cmd”中執行

一、資料匯出(exp.exe)

1、將資料庫orcl完全匯出,使用者名稱system,密碼accp,匯出到d:\daochu.dmp檔案中
 exp system/accp@orcl file=d:\daochu.dmp full=y
 
2、將資料庫orcl中scott使用者的對象匯出
 exp scott/accp@orcl file=d:\daochu.dmp  owner=(scott)
 
3、將資料庫orcl中的scott使用者的表emp、dept匯出
 exp scott/accp@orcl file= d:\daochu.dmp tables=(emp,dept)

 

4、將資料庫orcl中的資料表空間testSpace匯出
 exp system/accp@orcl file=d:\daochu.dmp tablespaces=(testSpace)

 

二、資料匯入(imp.exe)

1、將d:\daochu.dmp 中的資料匯入 orcl資料庫中。
 imp system/accp@orcl file=d:\daochu.dmp full=y

 

2、如果匯入時,資料表已經存在,將報錯,對該表不會進行匯入;加上ignore=y即可,表示忽略現有表,在現有表上追加記錄。
 imp scott/accp@orcl file=d:\daochu.dmp  full=y  ignore=y

 

3、將d:\daochu.dmp中的表emp匯入
 imp scott/accp@orcl file=d:\daochu.dmp tables=(emp)

 

 

 

聯繫我們

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