標籤: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 資料庫匯入匯出語句