oracle資料庫匯入匯出

來源:互聯網
上載者:User

以下操作在命令提示字元視窗(cmd.exe)中進行輸入

一、分步進行

1、分步進行匯出

C:\Documents and Settings\Administrator>exp 

使用者名稱:userid(資料庫中在安全性下使用者中所建立的使用者)

口令:password

輸入數組提取緩衝區大小:4096>(直接斷行符號)

匯出檔案:expdat.dmp>c:\a.dmp(此處填寫匯出檔案存放地址及名稱)

<1>E,<2>U,<3>T>2(此處選擇匯出類型,我選擇按使用者匯出)

匯出許可權>(直接斷行符號)

匯出表資料>(直接斷行符號)

壓縮區>(直接斷行符號)

要匯出的使用者>userid

要匯出的使用者>(直接斷行符號)

結束#

2、分布進行匯入

步驟同1,開始輸入imp

注意:

只列出匯入檔案的內容注意選擇no

匯入整個匯出檔案選擇yes

二、直接匯入匯出

1、直接匯出

 (1) 將資料庫TEST完全匯出,使用者名稱userid 密碼password 匯出到D:\daochu.dmp中
   exp
userid/password@TEST
file=d:\daochu.dmp full=y
 (2 )將資料庫中userid1使用者與userid2使用者的表匯出
   exp
userid1/password@TEST
file=d:\daochu.dmp owner=(userid1,userid2)
 (3) 將資料庫中的表table1 、table2匯出
   exp
userid/password@TEST
file=d:\daochu.dmp tables=(table1,table2) 
 (4) 將資料庫中的表table1中的欄位filed1以"00"打頭的資料匯出
   exp
userid/password@TEST
file=d:\daochu.dmp tables=(table1) query=\" where filed1 like  '00%'\"

2、直接匯入

 (1)將D:\daochu.dmp 中的資料匯入 TEST資料庫中。
imp
userid/password@TEST
file=d:\daochu.dmp  ignore=y 
 (2) 將d:\daochu.dmp中的表table1 匯入
imp
userid/password@TEST
file=d:\daochu.dmp tables=(table1)

聯繫我們

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