本篇内容介绍了“分析oracle中dmp的文件内容”的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让小编带领大家学习一下如何处理这些情况吧!希望大家仔细阅读,能够学有所成!
exp woo/oracle table=dump_table file=1.dmp; expdp woo/oracle tables=dump_table directory=dhome dumpfile=2.dmp; touch 3.dmp
SQL> create table dump_table as 2 select rownum as id, 3 to_char(sysdate + rownum / 24 / 3600, 'yyyy-mm-dd hh34:mi:ss') as inc_datetime, 4 trunc(dbms_random.value(0, 100)) as random_id, 5 dbms_random.string('x', 20) random_string 6 from dual 7 connect by level <= 10; Table created. SQL> desc dump_table; Name Null? Type ----------------------------------------- -------- ---------------------------- ID NUMBER INC_DATETIME VARCHAR2(19) RANDOM_ID NUMBER RANDOM_STRING VARCHAR2(4000) SQL> select count(*) from dump_table; COUNT(*) ---------- 10
[oracle@ora11grac1 ~]$ ls -rtl total 212 -rw-r--r-- 1 oracle oinstall 16384 Mar 18 15:06 1.dmp -rw-r----- 1 oracle asmadmin 98304 Mar 18 15:13 2.dmp -rw-r--r-- 1 oracle asmadmin 1071 Mar 18 15:14 export.log -rw-r----- 1 oracle asmadmin 98304 Mar 18 15:14 3.dmp
[oracle@ora11grac1 ~]$ sed -n 1p 1.dmp EXPORT:V11.02.00
SQL> set serveroutput on SQL> declare 2 v_filetype NUMBER; -- 0=unknown 1=expdp 2=exp 3=ext 3 v_info_table sys.ku$_dumpfile_info; -- PL/SQL table with file info 4 begin 5 dbms_datapump.get_dumpfile_info( 6 filename => '1.dmp', 7 directory => upper('dhome'), 8 info_table => v_info_table, filetype => v_filetype); 9 dbms_output.put_line('Filetype : ' || v_filetype); 10 end; 11 / Filetype : 2 SQL> set serveroutput on SQL> declare 2 v_filetype NUMBER; -- 0=unknown 1=expdp 2=exp 3=ext 3 v_info_table sys.ku$_dumpfile_info; -- PL/SQL table with file info 4 begin 5 dbms_datapump.get_dumpfile_info( 6 filename => '2.dmp', 7 directory => upper('dhome'), 8 info_table => v_info_table, filetype => v_filetype); 9 dbms_output.put_line('Filetype : ' || v_filetype); 10 end; 11 / Filetype : 1 PL/SQL procedure successfully completed. SQL> set serveroutput on SQL> declare 2 v_filetype NUMBER; -- 0=unknown 1=expdp 2=exp 3=ext 3 v_info_table sys.ku$_dumpfile_info; -- PL/SQL table with file info 4 begin 5 dbms_datapump.get_dumpfile_info( 6 filename => '3.dmp', 7 directory => upper('dhome'), 8 info_table => v_info_table, filetype => v_filetype); 9 dbms_output.put_line('Filetype : ' || v_filetype); 10 end; 11 / Filetype : 1 PL/SQL procedure successfully completed. SQL> set serveroutput on SQL> declare 2 v_filetype NUMBER; -- 0=unknown 1=expdp 2=exp 3=ext 3 v_info_table sys.ku$_dumpfile_info; -- PL/SQL table with file info 4 begin 5 dbms_datapump.get_dumpfile_info( 6 filename => 'export.log', 7 directory => upper('dhome'), 8 info_table => v_info_table, filetype => v_filetype); 9 dbms_output.put_line('Filetype : ' || v_filetype); 10 end; 11 / Filetype : 0 PL/SQL procedure successfully completed.
[oracle@ora11grac1 ~]$ sed -n 1p 2.dmp \ÒÂÇg€¼uC¡ÈÃë KàS H€"WOO"."SYS_EXPORT_TABLE_01"x86_64/Linux 2.4.xxora11grac1:woo1AL32UTF8 11.02.00.04.00001:001:000001:000001ÿÿ$$
[oracle@ora11grac1 ~]$ sed -n 2p 1.dmp DWOO
[oracle@ora11grac1 ~]$ sed -n 3p 1.dmp RTABLES
[oracle@ora11grac1 ~]$ sed -n 4p 1.dmp 8192
“分析oracle中dmp的文件内容”的内容就介绍到这里了,感谢大家的阅读。如果想了解更多行业相关的知识可以关注亿速云网站,小编将为大家输出更多高质量的实用文章!
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。