AUL/MyDUL Update, Version 3.2.1

    Change Log:

1, Change the column type of "UNLOAD" command to "RAW" (original: "SKIP")
2, Enhance of the column type guess for "SCAN TABLE" command
3, Change the logic of "SCAN TABLE" command to better output

    I will create a demo table in a 2M tablespace, as following :

CREATE TABLE TEST
(
   COL1 CHAR(10),
   COL2 VARCHAR2(10),
   COL3 DATE, COL4 NUMBER,
   COL5 BINARY_FLOAT,
   COL6 BINARY_DOUBLE
);

INSERT INTO TEST VALUES('A','A1',SYSDATE,1.11,1.0,1.0);
INSERT INTO TEST VALUES('B','B1',SYSDATE,2.11,2.0,2.02);
INSERT INTO TEST VALUES('C','C1',SYSDATE,3.11,3.0,3.02);
INSERT INTO TEST VALUES('D','D1',SYSDATE,4.11,4.0,4.02);
INSERT INTO TEST VALUES('E','E1',SYSDATE,5.11,5.0,5.02);

    Then I will test the new "UNLOAD" command without specify any column type information, you will see all column values are printed out in hex code:

AUL> open db10g.cfg
*  ts#  fno  rfn ver bsize     blocks filename
- ---- ---- ---- --- ----- ---------- -----------------------------------
Y    5    5    5 a2   8192        256 C:\ORACLE\ORADATA\AULTEST01.DBF
AUL> SCAN HEADER
2006-08-11 22:59:29
RDBA=0x0140000b(5/11),type=0x23,fmt=0xa2,seq=0x02,flag=0x04
seg/obj=0x000026ef=9967

2006-08-11 22:59:29
AUL> UNLOAD OBJECT 9967;
2006-08-11 22:59:45
41202020202020202020,4131,786a080b17012d,c1020c,bf800000,bff000...
42202020202020202020,4231,786a080b17013c,c1030c,c0000000,c00028...
43202020202020202020,4331,786a080b17020d,c1040c,c0400000,c00828...
44202020202020202020,4431,786a080b17021c,c1050c,c0800000,c01014...
45202020202020202020,4531,786a080b170227,c1060c,c0a00000,c01414...
2006-08-11 22:59:45

    Now I will test the "SCAN TABLE" command, it will tell you a command to unload the data (you could download the 2M tablespace for test), as following:

AUL> SCAN TABLE
2006-08-11 23:02:20
RDBA=0x0140000f(5/15),type=0x06,fmt=0xa2,seq=0x07,flag=0x06
seg/obj=0x000026ef=9967,csc=0x0000.000996dc,itc=2,typ=1 - DATA
tab#=  0     nrow=   5     offs=   0

41202020202020202020,4131,786a080b17012d,c1020c,bf800000,bff000...
42202020202020202020,4231,786a080b17013c,c1030c,c0000000,c00028...
43202020202020202020,4331,786a080b17020d,c1040c,c0400000,c00828...
44202020202020202020,4431,786a080b17021c,c1050c,c0800000,c01014...
45202020202020202020,4531,786a080b170227,c1060c,c0a00000,c01414...
Column Count=6
CMD:UNLOAD OBJECT 9967 CLUSTER 0 COLUMN  VARCHAR VARCHAR DATE NUMBER BINARY_FLOAT BINARY_DOUBLE

2006-08-11 23:02:20
AUL> UNLOAD OBJECT 9967 CLUSTER 0 COLUMN  VARCHAR VARCHAR DATE NUMBER BINARY_FLOAT BINARY_DOUBLE;
2006-08-11 23:07:03
A         ,A1,2006-08-11 22:00:44,1.11,1.000000,1.000000
B         ,B1,2006-08-11 22:00:59,2.11,2.000000,2.020000
C         ,C1,2006-08-11 22:01:12,3.11,3.000000,3.020000
D         ,D1,2006-08-11 22:01:27,4.11,4.000000,4.020000
E         ,E1,2006-08-11 22:01:38,5.11,5.000000,5.020000
2006-08-11 23:07:03

    This is the solution for lost system tablespace in AUL/MyDUL. Enjoy it!

Post a comment

SCode:
Mail(*, but will not be displayed):
Home: