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

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

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

1.功能簡(jiǎn)介

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

2.遷移條件:

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

3.查看幫助

可以通過(guò)help=y命令來(lái)調(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í)支持的參數(shù)與上述類(lèi)似,不完全相同,可以可以通過(guò)命令imp help=y進(jìn)行查看

4.Exp/imp的處理模式

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

(1)    整庫(kù)模式:導(dǎo)出導(dǎo)入整個(gè)數(shù)據(jù)庫(kù),對(duì)應(yīng)FULL參數(shù);

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

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

(4)    表模式:導(dǎo)出導(dǎo)入指定的表或分區(qū)表,對(duì)應(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)用

第一步,編輯一個(gè)文件

$ vi scott_emp.dat

           Tables=emp

           Buffer=20480

log=scott_emp.log

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

$ exp scott/tiger parfile=scott_emp.dat

6.Exp導(dǎo)出例子說(shuō)明

(1)    導(dǎo)出scott用戶的emp表

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

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

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

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

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

(4)    全庫(kù)導(dǎo)出

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

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

TABLES:   指定要導(dǎo)出那些表

QUERY:    對(duì)要導(dǎo)出的數(shù)據(jù)進(jìn)行篩選

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

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

      FULL:       FULL=y時(shí),代表全庫(kù)導(dǎo)出

      FILESIZE: 指定導(dǎo)出單一文件的大小

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

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

      INDEXES:指定是否導(dǎo)出表的索引,默認(rèn)為Y

      CONSTRAINTS:指定是否導(dǎo)出表的約束,默認(rèn)為Y

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

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

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

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

廣告

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

網(wǎng)站托管運(yùn)營(yíng)