imp工具命令詳解

2021-08-25 09:20:38 字數 3696 閱讀 4197

1 命令格式

1.1 命令格式

通過輸入imp命令和您的使用者名稱/口令, 匯出

例如: imp scott/tiger

1.2 關鍵字格式

格式: imp keyword=value 或keyword=(value1,value2,...,valuen)

例如: imp scott/tiger grant=y tables=(emp, dept, mgr) 或 tables=(t1:p1, t1:p2), 如果t1是分割槽表

2 命令關鍵字

userid 必須是命令列中的第乙個引數。

關鍵字

說明(預設值)

關鍵字

說明(預設值)

userid

使用者名稱/口令

full

匯入整個檔案(n)

fromuser

所有者使用者名稱列表

touser

使用者名稱列表

file

輸入檔案(expdat.dmp)

log

螢幕輸出的日誌檔案

tables

表名列表

rows

匯入資料行(y)

constraints

匯入的約束條件(y)

indexes

匯入索引(y)

grants

匯入許可權(y)

buffer

資料緩衝區大小,單位位元組

只有常規匯出時生效

recordlength

io 記錄的長度

parfile

引數檔名

statistics

指定當匯入匯出檔案時生成優化統計資訊的型別(預設estimate; compute, none)

show

只列出檔案內容(n)

ignore

忽略建立錯誤(n)

commit

提交陣列插入(n)

inctype

增量匯出型別

關鍵字

說明

feedback

每x 行顯示進度(0)

filesize

指定儲存檔案的最大尺寸,如果不指定則所有物件和資料會放到乙個匯出檔案中

indexfile

指定生成存放索引建立語句的檔名稱

resumable

指定是否要啟用「空間繼續分配」特徵(n)

resumable_name

指定錯誤被修改的最大時間間隔(預設7200秒)

resumable_timeout

resumable 的等待時間

destroy

指定在匯入時是否要覆蓋已存在的資料檔案(n)

skip_unusable_indexes

跳過不可用索引的維護(n)

toid_novalidate

跳過指定型別id的驗證

compile

指定匯入包、過程、函式時是否要進行編譯(y)

streams_configuration

匯入流的一般元資料(y)

streams_instantiation

匯入流例項化元資料(y)

下列關鍵字僅用於可傳輸的表空間

關鍵字

說明

transport_tablespace

匯入可傳輸的表空間元資料(n)

tablespaces

指定匯入特定表空間上的所有物件

datafiles

指定要搬移到目標資料庫的資料檔案列表(transport_tablespace=y時)

tts_owners

擁有可傳輸表空間集中資料的使用者

2.1 例1

如parm.txt的內容:

tables=dept,emp

indexes=n

constraints=n

grants=n

file=a.dmp

imp scott/tiger parfile=parm.txt

2.2 例2

imp scott/tiger tables=emp file=a.dmp indexfile=index.sql

2.3 例3

imp system/manager tables=scott.emp file=a.dmp resumable=y

2.4 例4

imp system/manager tables=scott.emp file=a.dmp resumable=y resumable_name=whl

2.5 例5

imp system/manager tablespaces=user01 file=a.dmp full=y

oracle exp和imp命令引數詳解

oracle中用exp imp命令引數詳解 用 exp 數 據 導 出 1 將資料庫test完全匯出,使用者名稱system 密碼manager 匯出到d daochu.dmp中 exp system manager test rows y indexes y compress n buffer 6...

Dmp檔案匯入(Imp命令)

1.匯入整個資料庫 shell c imp user pwd 使用者名稱 密碼 網路伺服器 file 檔名.dmp full y 匯入全部 ignore y 重新建立資料庫的所有物件,不會因為物件已存在而造成輸入操作錯誤 2.匯入特定的表 shell c imp user pwd 使用者名稱 密碼 ...

oracle 的exp和imp命令

我們通常要對oracle的資料進行匯入,匯出,在沒有expdb,impdb以前 10g以前 我們都是使用exp 匯出,imp命令來實現匯入。開啟cmd視窗,實現imp,exp主要是sqlplus.exe呼叫imp.exe,exp.exe來完成的。下面是幾個常用的關於exp,imp命令的一些舉例 1完...