ORACLE EXP和IMP方法介紹

2022-01-26 06:40:55 字數 1640 閱讀 9179

說明:

匯出:(匯出使用者,匯出表,匯出表結構不帶資料,

query

引數),匯入(

匯入資料檔案,匯入表結構,匯入資料忽略表結構,僅匯入資料

)。使用的引數按照自認為使用頻率由高到低介紹,內容相比較

exp幫助文件不全,但是足夠應對基本的工作任務,想仔細研究的建議檢視幫助文件。後續內容有變更會及時增加。

匯出命令 exp

exp user/password@sid file=expdat.dmp [ parameter 引數

]user:使用者名稱

password:密碼

sid:資料庫例項名

file:輸出檔案

(expdat.dmp)

輸出的檔案名字

direct:匯出的直接路徑

,匯出檔案的所在路徑,

輸出檔案的路徑也可以直接寫在file中

exp user/password@sid file=direct/expdat.dmp [ tables=|owner=|...]

owner:資料庫使用者名稱

tables:資料庫表列表

,支援多表匯出

exp user/password@sid file=expdat.dmp tables=table1 table2 ...

rows:匯出資料行 預設是

y 匯出表和資料,當

rows=n

只匯出表結構沒有資料

query:需要注意的是只在表模式

(表模式就是匯出表的操作

)中有效

exp user/password@sid file=expdat.dmp tables=tbname query=\"where id='1'\"

full:匯出整個檔案

(n )

grants:匯出許可權

(y)indexes:匯出索引

(y)inctype:增量匯出型別

triggers:匯出觸發器

(y)constraints:匯出的約束條件

(y)buffer :資料緩衝區的大小

log:螢幕輸出的日誌檔案

匯入命令(imp)

imp user/password@sid file=expdat.dmp [ parameter ]

file:輸入檔案

(expdat.dmp)

輸入的檔案名字

full:匯入整個檔案 預設

(n)

一般給

(y)       

ignore:忽略建立錯誤

(n)

imp user/password@sid file=expdat.dmp ignore=y full=y

rows:匯入資料行

(y)        

data_only:僅匯入資料

(y)imp user/password@sid file=expdat.dmp data_only=y full=y

grants :匯入許可權

(y)          

indexes :匯入索引

(y)

inctype :增量匯入型別        

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...

ORACLE exp匯出和imp匯入使用者表

在另一篇部落格有說到利用exp和imp匯出和匯入乙個普通使用者 不包含分割槽表的使用者 那現在這篇就來說下匯出和匯入乙個使用者的某些表。1 oracle11g企業版 2 登入scott使用者 將scott使用者下的某個表匯出,然後匯入到hr使用者下 為了不影響scott自帶的表,我們使用以下語句建立...

oracle exp匯出與imp匯入

通過exp匯出與imp匯入進行資料的備份轉移 exp命令 1exp username psw test file d test.dmp full y 2exp use rname psw test file d test.dmp owner ly 3exp username psw test fil...