oracle 資料庫匯入匯出語句

2021-07-11 14:14:21 字數 934 閱讀 6998

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

例子 1 將資料庫test完全匯出.使用者名稱system/manager匯出到d:daochu.dmp **如下:

exp system/manager@test file=d:daochu.dmp full=y

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

exp system/manager@test file=d:daochu.dmp owner=(system,sys)

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

exp system/manager@test file:= d:daochu.dmp tables=(table1,table2)

4.將資料庫中的表table1中的字段filed1以"00"打頭的資料匯出 **如下;

exp system/manager@test file:=d:daochu.dmp tables=(table1) query="where filed1 like '00%'"

5.將d:daochu.dmp中的資料匯入到test資料庫中**如下

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

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

imp system/manager@test file:=d:daochu.dmp ignore=y  就可以了

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

imp system/manager@test file:=d:daochu.dmp tables=(table1);

oracle資料庫匯入匯出語句

一 匯出 匯出語句 expdp sanyayun sanyayun syerpdb directory dmp dumpfile fooderp.dmp content all schemas sanyayun directory 資料夾名 注釋 此資料夾名稱並不是資料夾路徑,而是為某個路徑做的重新...

資料庫匯入匯出語句

資料庫匯入匯出語句 1。首先在dos下,進入oracle product 10.2.0 client 1 bin 目錄下執行命令。2。匯出資料dmp檔案 exp color red atf mas123 orcl color file d atf.dmp 紅色字型為資料庫使用者名稱和對應的配置 3。...

Oracle 資料庫 匯入匯出

匯入匯出時要,通過 執行 進行到oracle的安裝目錄的 bin 目錄下導 例如 d oracle product 10.1.0 db 1 bin 匯出分三種 匯出 表 方案 資料庫 1.1.1 匯出自己的表 說明 使用者 密碼 資料庫例項 表名 可多個 檔案路徑 exp userid scott ...