oracle 資料庫匯入匯出語句

來源:互聯網
上載者:User

標籤:dmp   服務   get   where   query   font   資料匯出   匯入   dmp檔案   

oracle的exp/imp命令用於實現對資料庫的匯出/匯入操作;exp命令用於把資料從遠端資料庫伺服器導到本地,產生.dmp檔案;imp命令用於把本地的資料庫.dmp檔案從本地匯入到遠端oracle資料庫中

 1 將資料庫test完全匯出.使用者名稱system/manager匯出到D:daochu.dmp 代碼如下:

exp system/[email protected] file=d:daochu.dmp full=y

2.將資料庫中system使用者與sys使用者的表匯出代碼如下:

exp system/[email protected] file=d:daochu.dmp owner=(system,sys)

3.將資料庫中的表table1 table2 匯出 代碼如下:

exp system/[email protected] file:= d:daochu.dmp tables=(table1,table2)

4.將資料庫中的表table1中的欄位filed1以"00"打頭的資料匯出 代碼如下;

exp system/[email protected] file:=d:daochu.dmp tables=(table1) query="where filed1 like ‘00%‘"

5.將D:daochu.dmp中的資料匯入到test資料庫中代碼如下

imp system/[email protected] file:=d:doachu.dmp  (這樣寫的肯定會報錯,因為資料庫中已經存在表了,對該表就不能匯入)

所以 要在後面加上ignore=y就可以了

imp system/[email protected] file:=d:daochu.dmp ignore=y  就可以了

6.將d:daochu.dmp中的表table1匯入到test的資料庫中

imp system/[email protected] file:=d:daochu.dmp tables=(table1);

oracle 資料庫匯入匯出語句

聯繫我們

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