Oracle資料庫的各種匯出 匯入方式

2022-01-10 17:58:05 字數 1376 閱讀 1440

一、資料匯出

1.完全匯出資料庫

將資料庫test完全匯出,使用者名稱system 密碼manager 匯出到d:\daochu.dmp中

1

exp system/manager@localhost

/test file

=d:\daochu.dmp full

=y

其中localhost表示資料庫伺服器的ip位址,這樣的話就可以匯出目標資料庫伺服器上面的資料了。下同。

2.匯出特定使用者擁有的表

將資料庫中system使用者與sys使用者的表匯出

exp system/manager@localhost/test

file

=d:\daochu.dmp owner=(system,sys)

3.匯出指定的表

將資料庫中的表table1 、table2匯出

exp system/manager@localhost/test

file

=d:\daochu.dmp tables=(table1,table2)

4.匯出指定的資料

將資料庫中的表table1中的字段filed1以"00"打頭的資料匯出

exp system/manager@localhost/test

file

=d:\daochu.dmp tables=(table1) query=\" where filed1 like

'00%

'\"

二、資料匯入

1.完全匯入資料庫

將d:\daochu.dmp 中的資料匯入 test資料庫中

imp system/manager@localhost/test

file

=d:\daochu.dmp ignore = y

因為有的表已經存在,然後它就報錯,對該錶就不進行匯入。在後面加上 ignore=y 之後,oracle就忽略這一錯誤,將其覆蓋。

2.匯入資料庫部分表

將d:\daochu.dmp中的表table1 匯入

imp system/manager@localhost/test

file

=d:\daochu.dmp tables=(table1)

……

(mark 未親自測試)

oracle資料庫導庫問題

一 dmp導庫過程中,資料量小的表匯入成功,到資料量大的表時開始報錯。發現原庫的表空間是users,匯入新庫後預設表空間是users,根據錯誤提示檢視新庫的的表空間users空間不大。採取源庫 新庫的表空間更換。imp 00058 遇到 oracle 錯誤 1653 ora 01653 表 zrzy...

oracle匯出資料庫

登入sqlplus sqlplus as sysdba 建立使用者 create user ncc identified by 123456 使用者授權 grant connect,resource,dba to ncc 建立資料夾進行匯出 create directory oracledump a...

oracle 匯出資料庫

第一種方式 使用plsql匯出資料庫 1 開啟plsql,找到工具欄,匯出表 2 進入匯出主頁,選擇資料夾,輸入匯出檔名稱 點選儲存 33 點選匯出按鈕,即可彈出匯出資料概況 4如果中途無報錯想象,即可在你選定的路徑下找到該dmp檔案,備份操作完成 end1 點選開始按鈕,在執行中輸入cmd 回車 ...