小男孩‘自慰网亚洲一区二区,亚洲一级在线播放毛片,亚洲中文字幕av每天更新,黄aⅴ永久免费无码,91成人午夜在线精品,色网站免费在线观看,亚洲欧洲wwwww在线观看

分享

expdp/impdp 數(shù)據(jù)泵導(dǎo)入導(dǎo)出

 路人甲Java 2022-03-14
  1. create directory mydata as '邏輯目錄路徑';
  2. 例如: 
  3. create directory mydata as '/data/oracle/oradata/mydata';
    grant read,write on directory mydata to public
    select * from dba_directories
    expdp 用戶名/密碼@ip地址/實(shí)例  [屬性]
    ip地址不寫默認(rèn)就是本地

    userid=test/test            --導(dǎo)出的用戶,本地用戶!!
    directory=dmpfile          --導(dǎo)出的邏輯目錄,一定要在oracle中創(chuàng)建完成的,并且給用戶授權(quán)讀寫權(quán)限
    dumpfile=xx.dmp      --導(dǎo)出的數(shù)據(jù)文件的名稱,如果想在指定的位置的話可以寫成dumpfile=/home/oracle/userxx.dmp
    logfile=xx.log          --日志文件,如果不寫這個(gè)參數(shù)的話默認(rèn)名稱就是export.log,可以在本地的文件夾中找到
    schemas=userxx       --使用dblink導(dǎo)出的用戶不是本地的用戶,需要加上schema來確定導(dǎo)出的用戶,類似于exp中的owner,但還有一定的區(qū)別
    EXCLUDE=TABLE:"IN('T1','T2','T3')"     --exclude 可以指定不導(dǎo)出的東西,table,index等,后面加上不想導(dǎo)出的表名
    network_link=db_local          --這個(gè)參數(shù)是使用的dblink來遠(yuǎn)程導(dǎo)出,需要指定dblink的名稱

    列出一些場景:

    1)導(dǎo)出用戶及其對象
    expdp scott/tiger@orcl schemas=scott dumpfile=expdp.dmp directory=dump_dir logfile=expdp.log;

    2)導(dǎo)出指定表
    expdp scott/tiger@orcl tables=emp,dept dumpfile=expdp.dmp directory=dump_dir logfile=expdp.log;

    3)按查詢條件導(dǎo)
    expdp scott/tiger@orcl directory=dump_dir dumpfile=expdp.dmp tables=empquery='where deptno=20' logfile=expdp.log;

    4)按表空間導(dǎo)
    expdp system/manager@orcl directory=dump_dir dumpfile=tablespace.dmp tablespaces=temp,example logfile=expdp.log;

    5)導(dǎo)整個(gè)數(shù)據(jù)庫
    expdp scott/123@127.0.0.1/orcl directory=dump_dir dumpfile=ly.dmp full=y  logfile=expdp.log;

    6)導(dǎo)入指定表

    impdp scott/tiger@orcl directory=dump_dir dumpfile=expdp.dmp table_exists_action=replace;

     

    本站是提供個(gè)人知識管理的網(wǎng)絡(luò)存儲空間,所有內(nèi)容均由用戶發(fā)布,不代表本站觀點(diǎn)。請注意甄別內(nèi)容中的聯(lián)系方式、誘導(dǎo)購買等信息,謹(jǐn)防詐騙。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請點(diǎn)擊一鍵舉報(bào)。
    轉(zhuǎn)藏 分享 獻(xiàn)花(0

    0條評論

    發(fā)表

    請遵守用戶 評論公約

    類似文章 更多