oracle資料幫浦匯出 匯入

2021-10-25 03:18:42 字數 824 閱讀 5986

1、資料幫浦匯出:

1.1新建目錄:plsql下

直接新建

或者通過語句:create directory data_dir as 『e:\ora\data』 ;

1.2匯出語句:

expdp username/password@tns

directory=目錄名稱

dumpfile=檔名

logfile=匯出日誌

遇到的問題:密碼或者使用者名稱中有特殊字元

解決方法:username/「pass@word」@tns

匯出的檔案在「目錄名稱」對應的路徑下。

注意:如果linux環境匯出,需要先切換oracle使用者,命令:su - oracle

在執行匯出語句。

1.3匯入語句:

把要匯入的檔案放到「目錄名稱」對應的路徑下(資料庫的機器)。

impdp username/password@tns

directory=目錄名稱

dumpfile=檔名

logfile=日誌檔案

remap_tablespace=匯出表空間:匯入表空間

remap_schema=匯出資料庫名稱:匯入資料庫名稱 table_exists_action=replace (「表存在替換」)

full=y (全庫)

注意:匯入是如果沒有使用者需要新建。

oracle 資料幫浦匯入匯出

sqlplus system system egov create directory dump dir as d dbback exit expdp system system egov directory dump dir dumpfile urbanyw.dmp schemas urbanyw...

oracle資料幫浦匯入匯出

使用expdp和impdp時應該注意的事項 exp和imp是客戶端工具程式,它們既可以在客戶端使用,也可以在服務端使用。expdp和impdp是服務端的工具程式,他們只能在oracle服務端使用,不能在客戶端使用。imp只適用於exp匯出的檔案,不適用於expdp匯出檔案 impdp只適用於expd...

oracle資料幫浦匯入匯出

1.建立資料幫浦目錄 create directory home as home expdp 2.授權 grant read,write on directory home to scott 資料字典dba directories 3.匯出 全庫匯出 expdp system oracle comp...