數(shù)據(jù)庫中exp導出方法是什么

本篇內(nèi)容介紹了“數(shù)據(jù)庫中exp導出方法是什么”的有關(guān)知識,在實際案例的操作過程中,不少人都會遇到這樣的困境,接下來就讓小編帶領(lǐng)大家學習一下如何處理這些情況吧!希望大家仔細閱讀,能夠?qū)W有所成!

讓客戶滿意是我們工作的目標,不斷超越客戶的期望值來自于我們對這個行業(yè)的熱愛。我們立志把好的技術(shù)通過有效、簡單的方式提供給客戶,將通過不懈努力成為客戶在信息化領(lǐng)域值得信任、有價值的長期合作伙伴,公司提供的服務(wù)項目有:域名申請、虛擬主機、營銷軟件、網(wǎng)站建設(shè)、喀什網(wǎng)站維護、網(wǎng)站推廣。

1.功能簡介

Export和import是oracle很常用的數(shù)據(jù)遷移工具(導出/導入)。這種遷移方式采用的是邏輯遷移。實際進行操作時,export/import對應(yīng)的命令是emp/imp(注意小寫)。

2.遷移條件:

exp&imp支持跨版本、跨平臺的遷移,還支持夸字符集的數(shù)據(jù)遷移。最重要的是,在遷移之前不需要做任何的準備工作,只需要執(zhí)行exp/imp命令,指定相關(guān)參數(shù)即可完成導出/導入任務(wù)

3.查看幫助

可以通過help=y命令來調(diào)出幫助信息

[oracle@localhost u01]$ exp help=y

Export: Release 11.2.0.4.0 - Production on Tue Oct 23 02:43:45 2018

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

USERID must be the first parameter on the command line.

Keyword    Description (Default)      Keyword      Description (Default)

--------------------------------------------------------------------------

USERID     username/password          FULL         export entire file (N)

BUFFER     size of data buffer        OWNER        list of owner usernames

FILE       output files (EXPDAT.DMP)  TABLES       list of table names

COMPRESS   import into one extent (Y) RECORDLENGTH length of IO record

GRANTS     export grants (Y)          INCTYPE      incremental export type

INDEXES    export indexes (Y)         RECORD       track incr. export (Y)

DIRECT     direct path (N)            TRIGGERS     export triggers (Y)

LOG        log file of screen output  STATISTICS   analyze objects (ESTIMATE)

ROWS       export data rows (Y)       PARFILE      parameter filename

CONSISTENT cross-table consistency(N) CONSTRAINTS  export constraints (Y)

OBJECT_CONSISTENT    transaction set to read only during object export (N)

FEEDBACK             display progress every x rows (0)

FILESIZE             maximum size of each dump file

FLASHBACK_SCN        SCN used to set session snapshot back to

FLASHBACK_TIME       time used to get the SCN closest to the specified time

QUERY                select clause used to export a subset of a table

RESUMABLE            suspend when a space related error is encountered(N)

RESUMABLE_NAME       text string used to identify resumable statement

RESUMABLE_TIMEOUT    wait time for RESUMABLE

TTS_FULL_CHECK       perform full or partial dependency check for TTS

VOLSIZE              number of bytes to write to each tape volume

TABLESPACES          list of tablespaces to export

TRANSPORT_TABLESPACE export transportable tablespace metadata (N)

TEMPLATE             template name which invokes iAS mode export

Export terminated successfully without warnings.

注:執(zhí)行imp時支持的參數(shù)與上述類似,不完全相同,可以可以通過命令imp help=y進行查看

4.Exp/imp的處理模式

Exp/imp工具在使用的時候支持4中操作模式:

(1)    整庫模式:導出導入整個數(shù)據(jù)庫,對應(yīng)FULL參數(shù);

(2)    表空間模式:導出導入指定表空間中的對象數(shù)據(jù),對應(yīng)tablespace參數(shù);

(3)    用戶模式:導出導入用戶自有對象,對應(yīng)owner參數(shù);

(4)    表模式:導出導入指定的表或分區(qū)表,對應(yīng)tables參數(shù)。

5.Exp調(diào)用方式

(1)    命令行方式調(diào)用

直接執(zhí)行命令

例如:$ exp scott/tiger tables=emp file=scott_emp.dmp log=scott_emp.log

(2)    參數(shù)文件方式調(diào)用

第一步,編輯一個文件

$ vi scott_emp.dat

           Tables=emp

           Buffer=20480

log=scott_emp.log

第二步,然后在執(zhí)行命令時調(diào)用這個文件

$ exp scott/tiger parfile=scott_emp.dat

6.Exp導出例子說明

(1)    導出scott用戶的emp表

$ exp scott/tiger tables=emp file=scott_emp.dmp log=scott_emp.log            

(2)    導出scott用戶emp表中empno>100的數(shù)據(jù)

$ exp scott/tiger tables=emp query="'where empno>100'" file=scott_emp100.dmp log=scott_emp100.log

(3)    導出scott用戶所有的表

$ exp scott/tiger owner=scott file=scott_tables.dmp log=scott_tables.log

(4)    全庫導出

$ exp system/oracle full=y file=fulldb.dmp log=fulldb.log

7.重要參數(shù)說明

TABLES:   指定要導出那些表

QUERY:    對要導出的數(shù)據(jù)進行篩選

      SCHEMA:  指定schema(寫成用戶名)

      LOG:        指定產(chǎn)生日志文件名

      FULL:       FULL=y時,代表全庫導出

      FILESIZE: 指定導出單一文件的大小

      索引、約束、授權(quán)

      GRANTS:指定對象的授權(quán)信息(訪問、操作權(quán)限),默認為Y

      INDEXES:指定是否導出表的索引,默認為Y

      CONSTRAINTS:指定是否導出表的約束,默認為Y

      TRIGGERS:指定是否導出與表相關(guān)的觸發(fā)器,默認為Y

“數(shù)據(jù)庫中exp導出方法是什么”的內(nèi)容就介紹到這里了,感謝大家的閱讀。如果想了解更多行業(yè)相關(guān)的知識可以關(guān)注創(chuàng)新互聯(lián)網(wǎng)站,小編將為大家輸出更多高質(zhì)量的實用文章!

網(wǎng)站名稱:數(shù)據(jù)庫中exp導出方法是什么
路徑分享:http://muchs.cn/article26/iidsjg.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供定制網(wǎng)站軟件開發(fā)、網(wǎng)頁設(shè)計公司、App開發(fā)、網(wǎng)站營銷、建站公司

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)

網(wǎng)站托管運營