分析oracle中dmp的文件内容
本篇内容介绍了“分析oracle中dmp的文件内容”的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让小编带领大家学习一下如何处理这些情况吧!希望大家仔细阅读,能够学有所成!
配置实验环境:1.1 生产三个文件
expwoo/oracletable=dump_tablefile=1.dmp;expdpwoo/oracletables=dump_tabledirectory=dhomedumpfile=2.dmp;touch3.dmp2.创建随机数据
SQL>createtabledump_tableas2selectrownumasid,3to_char(sysdate+rownum/24/3600,'yyyy-mm-ddhh34:mi:ss')asinc_datetime,4trunc(dbms_random.value(0,100))asrandom_id,5dbms_random.string('x',20)random_string6fromdual7connectbylevel<=10;Tablecreated.SQL>descdump_table;NameNull?Type-----------------------------------------------------------------------------IDNUMBERINC_DATETIMEVARCHAR2(19)RANDOM_IDNUMBERRANDOM_STRINGVARCHAR2(4000)SQL>selectcount(*)fromdump_table;COUNT(*)----------103.生成如下文件
[oracle@ora11grac1~]$ls-rtltotal212-rw-r--r--1oracleoinstall16384Mar1815:061.dmp-rw-r-----1oracleasmadmin98304Mar1815:132.dmp-rw-r--r--1oracleasmadmin1071Mar1815:14export.log-rw-r-----1oracleasmadmin98304Mar1815:143.dmp4.判断文件室友哪个版本生成的
[oracle@ora11grac1~]$sed-n1p1.dmpEXPORT:V11.02.005.判断文件类型
SQL>setserveroutputonSQL>declare2v_filetypeNUMBER;--0=unknown1=expdp2=exp3=ext3v_info_tablesys.ku$_dumpfile_info;--PL/SQLtablewithfileinfo4begin5dbms_datapump.get_dumpfile_info(6filename=>'1.dmp',7directory=>upper('dhome'),8info_table=>v_info_table,filetype=>v_filetype);9dbms_output.put_line('Filetype:'||v_filetype);10end;11/Filetype:2SQL>setserveroutputonSQL>declare2v_filetypeNUMBER;--0=unknown1=expdp2=exp3=ext3v_info_tablesys.ku$_dumpfile_info;--PL/SQLtablewithfileinfo4begin5dbms_datapump.get_dumpfile_info(6filename=>'2.dmp',7directory=>upper('dhome'),8info_table=>v_info_table,filetype=>v_filetype);9dbms_output.put_line('Filetype:'||v_filetype);10end;11/Filetype:1PL/SQLproceduresuccessfullycompleted.SQL>setserveroutputonSQL>declare2v_filetypeNUMBER;--0=unknown1=expdp2=exp3=ext3v_info_tablesys.ku$_dumpfile_info;--PL/SQLtablewithfileinfo4begin5dbms_datapump.get_dumpfile_info(6filename=>'3.dmp',7directory=>upper('dhome'),8info_table=>v_info_table,filetype=>v_filetype);9dbms_output.put_line('Filetype:'||v_filetype);10end;11/Filetype:1PL/SQLproceduresuccessfullycompleted.SQL>setserveroutputonSQL>declare2v_filetypeNUMBER;--0=unknown1=expdp2=exp3=ext3v_info_tablesys.ku$_dumpfile_info;--PL/SQLtablewithfileinfo4begin5dbms_datapump.get_dumpfile_info(6filename=>'export.log',7directory=>upper('dhome'),8info_table=>v_info_table,filetype=>v_filetype);9dbms_output.put_line('Filetype:'||v_filetype);10end;11/Filetype:0PL/SQLproceduresuccessfullycompleted.6.数据库字符集,数据库名称,操作系统类型,操作系统名称
[oracle@ora11grac1~]$sed-n1p2.dmp\ÒÂÇg€¼uC¡ÈÃëKàSH€"WOO"."SYS_EXPORT_TABLE_01"x86_64/Linux2.4.xxora11grac1:woo1AL32UTF811.02.00.04.00001:001:000001:000001ÿÿ$$7.判断文件所属表空间或用户
[oracle@ora11grac1~]$sed-n2p1.dmpDWOO8.导出方式,USER,TABLE,
[oracle@ora11grac1~]$sed-n3p1.dmpRTABLES9.判断文件数据块大小
[oracle@ora11grac1~]$sed-n4p1.dmp8192
“分析oracle中dmp的文件内容”的内容就介绍到这里了,感谢大家的阅读。如果想了解更多行业相关的知识可以关注亿速云网站,小编将为大家输出更多高质量的实用文章!
声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系本站删除。