Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> oracle internal storage of numbers
Question,
My company had a crash and we very much need to recover some data. To do this, I need to know how to decode number formats?
How I tried to decode 'em
First thing that I did was to create a simple
table with two fields. Field 1 was a number and
Field 2 was a string. I then preceded to stuff
various number,string combos in the table. I'd
then od the file underlying
the tablespace underlying the table in question.
create table delme2(foo1 number(38), foo2 varchar2(256)) tablespace test_crash;
insert into delme2 values (0, 'abc'); insert into delme2 values (10, 'def'); insert into delme2 values (150, 'ghi'); insert into delme2 values (2100, 'qrstu'); insert into delme2 values (1, 'dddd'); insert into delme2 values (2, 'eeee'); insert into delme2 values (3, 'fff'); insert into delme2 values (4, 'ggg'); insert into delme2 values (20, 'hhh'); insert into delme2 values (30, 'iii'); insert into delme2 values (160764, 'jjj'); insert into delme2 values (66027, 'tiel');
The goal was to insert numbers in such a way that a pattern could be discerned. I couldn't. But any help would be appreciated.
-Sandy
*
od -c -j 077000 test2.dbf
0000000 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0
*
0000560 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 , 001 002 004 303
0000600 007 = 034 004 t i e l , \0 002 004 303 021 \b A
0000620 003 j j j , \0 002 002 301 037 003 i i i , \0
0000640 002 002 301 025 003 h h h , \0 002 002 301 005 003 g
0000660 g g , \0 002 002 301 004 003 f f f , \0 002 002
0000700 301 003 004 e e e e , \0 002 002 301 002 004 d d
0000720 d d , \0 002 002 302 026 005 q r s t u , \0
0000740 002 003 302 002 3 003 g h i , \0 002 002 301 013 003
0000760 d e f , \0 002 001 200 003 a b c \0 001 \0 017
0001000 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0
*
^?# od -b -j 077000 test2.dbf
0000000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000
*
0000560 000 000 000 000 000 000 000 000 000 000 000 054 001 002 004 303
0000600 007 075 034 004 164 151 145 154 054 000 002 004 303 021 010 101
0000620 003 152 152 152 054 000 002 002 301 037 003 151 151 151 054 000
0000640 002 002 301 025 003 150 150 150 054 000 002 002 301 005 003 147
0000660 147 147 054 000 002 002 301 004 003 146 146 146 054 000 002 002
0000700 301 003 004 145 145 145 145 054 000 002 002 301 002 004 144 144
0000720 144 144 054 000 002 002 302 026 005 161 162 163 164 165 054 000
0000740 002 003 302 002 063 003 147 150 151 054 000 002 002 301 013 003
0000760 144 145 146 054 000 002 001 200 003 141 142 143 000 001 000 017
0001000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000
*
Received on Wed Oct 28 1998 - 00:00:00 CST