Re: dbimport (OWS 7.2) eats NULL-Bytes
Posted in 1998
Topics: Server Administration, Migration, Import/Export & Data Conversion, Platform-Specific Issues, Internationalization & Character Sets
Werner Greiner wrote:
>
> dbimport (OWS 7.2) eats NULL-Bytes
>
> after loading a database with dbimport,
> all NULL-Bytes in BYTE-columns are deleted.
>
> example :
> data file to be loaded :
> 45832|0||||||000100093030303034353833320002000a31|
> ^^ ^^ ^^ ^^
>
> after loading with dbimport (and unloading with dbexport again )
> the data looks like this :
> 45832|0||||||0109303030303435383332020a31|
>
> my environment :
> - the database was exported
> with Informix OnLine Dynamic Server 7.13
> on SNI Reliant Unix 5.43
>
> - it is imported
> with Informix OnLine Workgroup Server 7.20
> on SNI Reliant Unix 5.43 or
> SUN Solaris 2.5.1
> (same effect on both platforms. )
>
> Any Hints ? TIA
> --
> Werner Greiner werner.greiner@sisis.de
>
more detailled information regarding that problem :
1. when loading the data with dbacces and sql-command 'load'
all is fine
2. when logging dbimport with truss(1) :
truss -f -r all -w all -o /tmp/dbi.tr $INFORMIXDIR/bin/dbimport
sis1 \\
-i `pwd`
I found the following :
this is read by dbimport from my data file :
4118: open("/export/home/sisis/dbi/sis1.exp/t2.unl", O_RDONLY) = 8
4118: fstat(8, 0xEFFFF668) = 0
4118: brk(0x000E9AE8) = 0
4118: brk(0x000EBAE8) = 0
4118: ioctl(8, TCGETA, 0xEFFFF5F4) 4118: 4 5 8 3 2 | 0 | | | | |
| 0 0 0 0 0 1 0 0 0 9 3 0 3 0 3 0 3 0 3
4118: 4 3 5 3 8 3 3 3 2 0 0 0 0 0 2 0 0 0 a 3 1 3 1 2 e 3 0 3 2 2 e
3
4118: 1 3 9 3 9 3 8 0 0 5 b 0 0 1 2 4 b 7 2 6 1 6 e 6 b 6 5 6 e 6 8
6
4118: 1 7 5 7 3 7 5 6 d 7 3 6 3 6 8 6 1 7 5 0 0 6 3 0 0 4 9 4 2 6 5
6
4118: 9 6 c 6 1 6 7 6 5 6 e 3 a 2 0 6 b 7 5 2 d 5 3 7 0 6 5 7 a 6 9
6
4118: 1 6 c 2 c 2 0 4 5 7 3 7 3 6 5 6 e 2 0 7 5 6 e 6 4 2 0 5 4 7 2
6
4118: 9 6 e 6 b 6 5 6 e 2 0 6 9 6 d 2 0 4 b 7 2 6 1 6 e 6 b 6 5 6 e
6
4118: 8 6 1 7 5 7 3 2 c 2 0 d 6 6 b 6 f 6 c 6 f 6 7 6 9 6 5 2 d 4 4
6
4118: 5 7 0 6 5 7 3 6 3 6 8 6 5 0 0 7 c 0 0 0 7 3 1 3 9 3 9 3 8 2 0
6
4118: 6 6 6 0 1 0 7 0 0 0 1 5 3 0 1 0 9 f f f c 0 0 0 2 3 0 3 0 0 1
0
4118: b f f f 6 0 0 0 8 3 0 3 1 2 d 3 0 3 0 3 0 3 0 3 1 0 1 0 c f f
f
4118: 3 0 0 0 b 3 9 3 8 4 6 2 d 3 0 3 0 3 0 3 0 3 0 3 0 3 2 0 1 0 d
f
4118: f f a 0 0 0 4 4 8 5 5 4 7 4 5 0 1 0 e 0 0 0 1 0 2 |\\n
dbimport creates a temp. file in /tmp where it stores the
contents of the BYTE column :
4118: open("/tmp/dbx4118_7", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 9
4118: fstat(9, 0xEFFFF6D0) = 0
4118: brk(0x000EBAE8) = 0
4118: brk(0x000EDAE8) = 0
4118: ioctl(9, TCGETA, 0xEFFFF65C) Err#25 ENOTTY
4118: write(9, 0x000EA06C, 180) = 180
4118: 01\\t 0 0 0 0 4 5 8 3 202\\n 1 1 . 0 2 . 1 9 9 8 [12 K r a n k e
n
4118: h a u s u m s c h a u c I B e i l a g e n : k u - S p e z i
a
4118: l , E s s e n u n d T r i n k e n i m K r a n k e n
h
4118: a u s , D6 k o l o g i e - D e p e s c h e |07 1 9 9 8 f
f01
4118: 0701 S01\\tFFFC02 0 001\\vFFF6\\b 0 1 - 0 0 0 0 101\\fFFF3\\v 9 8 F
-
4118: 0 0 0 0 0 0 201\\rFFFA04 H U G E010E0102
NOTE : here the NULL-Bytes are already missing !!!
somewhat later, dbimport reads this temp file again and
sends the data to the OnLine Server by writing on /dev/tcp
(file desc. 7 == /dev/tcp ) :
4118: write(7, 0x000E0360, 190) = 190
4118: \\0 '\\0B401\\t 0 0 0 0 4 5 8 3 202\\n 1 1 . 0 2 . 1 9 9 8 [12 K r
a
4118: n k e n h a u s u m s c h a u c I B e i l a g e n : k u - S
p
4118: e z i a l , E s s e n u n d T r i n k e n i m K r a
n
4118: k e n h a u s , D6 k o l o g i e - D e p e s c h e |07 1 9 9
8
4118: f f010701 S01\\tFFFC02 0 001\\vFFF6\\b 0 1 - 0 0 0 0
101\\fFFF3\\v
4118: 9 8 F - 0 0 0 0 0 0 201\\rFFFA04 H U G E010E0102\\0 '\\0\\0\\0\\f
Here I can't find any difference to the above block.
This means, the error occurs within dbimport client.
It's not a problem of the Online Server itself.
Can it be a problem of GLS package (global language support) ?
Just a guess, cause this seems to be the only part of OWS that is
really new.
--
Werner Greiner
werner.greiner@sisis.de