Oracle Êý¾ÝÀàÐÍ·ÖÏí
¸øÍŶÓÄÚ²¿×öµÄÒ»¸öOracle Êý¾ÝÀàÐÍ·ÖÏí£¬Ö÷ÒªÊǹØÓÚOracleÊý¾ÝÀàÐÍһЩÄÚ²¿´æ´¢½á¹¹¼°ÐÔÄܽéÉÜ¡£
http://www.slideshare.net/yzsind/oracle-4317768
ÒÔÏÂÊÇPPTÖÐunDumpNumberº¯ÊýµÄÈ«²¿´úÂ룺
create or replace function unDumpNumber(iDumpStr varchar2) return number is
TYPE ByteArray IS TABLE OF NUMBER INDEX BY BINARY_INTEGER;
Bytes ByteArray;
Result number;
i integer;
pos1 integer;
pos2 integer;
pos3 integer;
vlength integer;
begin
result := 0;
pos1 := instr(iDumpStr, 'Len=') + 4;
pos2 := instr(iDumpStr, ':');
vlength := substr(iDumpStr, pos1, pos2 - pos1);--get length
i := 0;
pos2 := pos2 + 1;
--½«dumpµÄ×Ö·û´®Ìî³äµ½Êý×éÖÐ
for i in 0..vlength-1
loop
pos3 := instr(iDumpStr, ',', pos2);
if pos3>0 then
Bytes(i) := trim(substr(iDumpStr, pos2, pos3 - pos2 ));
else
Bytes(i) := trim(substr(iDumpStr, pos2));--×îºó1×Ö½Ú
end if;
pos2 := pos3 + 1;
end loop;
--»¹ÔNUMBER
if Bytes(0) = 128 then --128±íʾ0
result := 0;
elsif Bytes(0) > 128 then --´óÓÚ128±íʾÕýÊý
for i in 1 .. vlength - 1 loop
result := result +
(Bytes(i) - 1) * power(100, (Bytes(0) - 193) - i+1);
end loop;
else --СÓÚ128±íʾ¸ºÊý
for i in 1 .. vlength - 2 loop
result := result +
&nb
Ïà¹ØÎĵµ£º
<!--
@page { margin: 2cm }
P { margin-bottom: 0.21cm }
-->
¹«ÍøÖÕÓÚͨµÄ£¬ÎÒµÄubuntu
Ò²ÖÕÓÚ¿ÉÒÔ¼ÌÐøÊ¹ÓÃÁË¡£¡£¡£
Ê×ÏȰѱ¾×ÓµÄubuntu
´Ó9.04
Éý¼¶µ½10.04
£¬·¢ÏÖϵͳ±ä³ÉÓ¢ºº»ìÓÃÁË£¬ÖØÑ¡ÓïÑÔÖ§³Ö°üÒ²²»¿ÉÒÔ£¬ÊäÈë·¨Ò²Ìí¼Ó²»ÉÏ£¬µ¹ÊÇûÓÐÍøÉÏÓÐÈËÌáµ½µÄϵͳÏìÓ¦·Ç³£»ºÂýµÄÎ ......
ΪÁË×öÐéÄâ»ú£¬ÐèÒª½«·þÎñÆ÷ÉϵÄ11gµÄÓû§µÄÍêÕûÊý¾Ýµ¼³öÀ´¡£¶øÐéÄâ»úÉϵÄoracle10gµÄ£¬Ö±½Óµ¼³öÀ´£¬ÎÞ·¨µ¼Èëµ½ÐéÄâ»ú¡£
ËùÒÔ£¬ÊÔ×ÅÓÃ10gµÄ¿Í»§¶ËÀ´µ¼³öÊý¾Ý£¬
ÓÃÃüÁî:exp exoa/*****@exoa1 file=20100526.dmp grants=y full=y
Ö´Ðкó£¬ÏµÍ³Ìáʾ£º
EXP-00008:Óöµ½ ORACLE´íÎó1406
&nb ......
ʲôÊǺϲ¢¶àÐÐ×Ö·û´®£¨Á¬½Ó×Ö·û´®£©ÄØ£¬ÀýÈ磺
SQL> desc test;
Name Type Nullable Default Comments
------- ------------ -------- ------- --------
COUNTRY VARCHAR2(20) Y &nb ......
ʲôÊǺϲ¢¶àÐÐ×Ö·û´®£¨Á¬½Ó×Ö·û´®£©ÄØ£¬ÀýÈ磺
SQL> desc test;
Name Type Nullable Default Comments
------- ------------ -------- ------- --------
COUNTRY VARCHAR2(20) Y &nb ......
ÀûÓÃoracleÉ󼯹¦ÄÜÀ´¼à²âÊÔ»·¾³µÄ±ä»¯
×ö¹ý²âÊÔµÄÈ˶¼Ó¦¸Ã»áÅöµ½ÕâÑùµÄÇé¿ö£º²âÊÔ·¢ÏÖµÄbugÔÚ¿ª·¢»úÆ÷ÉÏûÓгöÏÖ£¬ÏÔÈ»ÕâÊÇ»·¾³²îÒìµÄÔÒò¡£Ï൱¶àÇé¿öÏ£¬ÒòΪ²âÊÔʹÓõÄÊý¾Ý¿â½á¹¹ºÍ¿ª·¢Ê¹ÓõÄÊý¾Ý¿â½á¹¹²»Ò»ÖÂÔì³ÉµÄ¡£ÓÈÆäÊÇһЩ¹«Ë¾ÔÚÌá½»²âÊÔ°æ±¾µÄʱºò£¬×¢ÖØÓ¦Óà ......