您好,登錄后才能下訂單哦!
本篇內(nèi)容介紹了“分析oracle中dmp的文件內(nèi)容”的有關(guān)知識(shí),在實(shí)際案例的操作過程中,不少人都會(huì)遇到這樣的困境,接下來就讓小編帶領(lǐng)大家學(xué)習(xí)一下如何處理這些情況吧!希望大家仔細(xì)閱讀,能夠?qū)W有所成!
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的文件內(nèi)容”的內(nèi)容就介紹到這里了,感謝大家的閱讀。如果想了解更多行業(yè)相關(guān)的知識(shí)可以關(guān)注億速云網(wǎng)站,小編將為大家輸出更多高質(zhì)量的實(shí)用文章!
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。