Oracle資料庫匯入匯出方法

2021-08-29 19:41:28 字數 1250 閱讀 7867

oracle資料庫匯入匯出方法:

1.使用命令列:

資料匯出:

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.將資料庫中的表inner_notify、notify_staff_relat匯出

exp aichannel/aichannel@testdb2 file= d:\data\newsmgnt.dmp tables=(inner_notify,notify_staff_relat)

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

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

上面是常用的匯出,對於壓縮,既用winzip把dmp檔案可以很好的壓縮。

也可以在上面命令後面加上compress=y來實現。

資料的匯入:

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

imp system/manager@test file=d:\daochu.dmp

imp aichannel/aichannel@hust full=y file=file= d:\data\newsmgnt.dmp ignore=y

上面可能有點問題,因為有的表已經存在,然後它就報錯,對該錶就不進行匯入。

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

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

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

2.plsql:

資料匯出:

tools-export user objects(使用者物件)

tools-export tables(表)

資料的匯入:

tools-import tables

oracle import(表) sql inserts(使用者物件)

也可以將使用者物件的語句拷貝出來,貼上到command window這樣的好處是可以看到執行的過程。

Oracle資料庫匯入匯出方法

oracle 資料庫匯入匯出方法 在cmd 中行用 imp 格式。在sqlplus 中用 imp 格式。1.使用命令列 資料匯出 1.將資料庫test完全匯出,使用者名稱system密碼manager匯出到d daochu.dmp中 exp system manager test file d da...

Oracle資料庫匯入匯出方法

oracle資料庫匯入匯出方法 如果存在使用者和表先刪除 drop user username cascade 1.將資料庫test完全匯出,使用者名稱system密碼manager匯出到d daochu.dmp中 exp system manager test file d daochu.dmp ...

Oracle 資料庫 匯入匯出

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