Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
A user dbexported a database from Informix 9.3 on Windows NT and dbimported it on Red Hat Linux, getting "Load file has different number of columns than table." Respondents suggested checking DBDELIMITER matches the delimiter recorded in the .exp header, watching for delimiter characters inside char data, and — most likely — the Windows/Unix line-ending problem: stray carriage returns look like an extra trailing field. Fixes offered were transferring the files by FTP in ASCII mode or converting with dos2unix/tr/sed/awk/perl. The poster never confirmed which cure worked, so no resolution is recorded.
NGUYEN VAN — — source: IIUG Forums & Mailing Lists
Hi Everyone!
I was exported database with the name 'A' --> 'A.exp' on Windows NT
4.0(Informix 9.3 TC2).
Then I was imported to Red Hat Linux 7.2(Informix 9.3 UC1) but error:
"Load file has different number of column than table".
I don't know this error.
Any idea ?
Thanks.
From
Google ------------ comp.databases.informix
check your DBDELIMITER environment variable.
see the header of dbexport file, one line like this
{ DATABASE syspgm4gl delimiter | }
the "|" is the delimiter on the unloaded files, if you have one DBDELIMTER
variable set to other value than "|" the dbimport will not work.
Other cuase may be values in char field with containts characters like the
delimiter.
example:
one table with one field
field=name
value="Peter|Pete"
in the unload file
Peter|Pete
and the dbimport will fail with the same error "Load file has...."
-------------------
Colin Bull
c.bull@VideoNetworks.com
> -----Original Message-----
> From: forum.subscriber@iiug.org [mailto:forum.subscriber@iiug.org]On
> Behalf Of NGUYEN VAN HIEU
> Sent: 04 April 2003 07:21
> To: ids@iiug.org
> Subject: Moving database informix from Win NT4 to Linux 7.2 [844]
>
>
> Hi Everyone!
> I was exported database with the name 'A' --> 'A.exp' on Windows NT
4.0(Informix 9.3 TC2).
> Then I was imported to Red Hat Linux 7.2(Informix 9.3 UC1) but error:
> "Load file has different number of column than table".
> I don't know this error.
> Any idea ?
> Thanks.
>
dexport? what parameters? and how did you transfer the files from the
windows env to the linux env? What table does the dbimport have issue with?
Look at the load file and see if there truly is a difference in values...
-----Original Message-----
From: NGUYEN VAN HIEU [mailto:hieuid@yahoo.com]
Sent: Friday, April 04, 2003 12:21 AM
To: ids@iiug.org
Subject: Moving database informix from Win NT4 to Linux 7.2 [844]
Hi Everyone!
I was exported database with the name 'A' --> 'A.exp' on Windows NT
4.0(Informix 9.3 TC2).
Then I was imported to Red Hat Linux 7.2(Informix 9.3 UC1) but error:
"Load file has different number of column than table".
I don't know this error.
Any idea ?
Thanks.
NGUYEN,
Try to transfer the files by ftp in ascii mode.
This mode extracts the ^M.
Good luck.
Quique.
At 01:21 04/04/2003 -0500, NGUYEN VAN HIEU wrote:
>Hi Everyone!
>I was exported database with the name 'A' --> 'A.exp' on Windows NT
>4.0(Informix 9.3 TC2).
>Then I was imported to Red Hat Linux 7.2(Informix 9.3 UC1) but error:
>"Load file has different number of column than table".
>I don't know this error.
>Any idea ?
>Thanks.
If you didn't deal with WinNT vs Unix line endings, then you have a stray
carriage return masquerading as the data in an extra field at the end of
each line.
Try to find a dos2unix or dtou program to do the conversion - or use 'tr'
or sed or awk or perl or tcl or python or ...
--
Jonathan Leffler (jleffler@us.ibm.com)
STSM, Informix Database Engineering, IBM Data Management
4100 Bohannon Drive, Menlo Park, CA 94025
Tel: +1 650-926-6921 Tie-Line: 630-6921
"I don't suffer from insanity; I enjoy every minute of it!"
|---------+---------------------------->
| | "NGUYEN VAN HIEU"|
| | <hieuid@yahoo.com|
| | > |
| | Sent by: |
| | forum.subscriber@|
| | iiug.org |
| | |
| | |
| | 04/03/2003 10:21 |
| | PM |
| | |
|---------+---------------------------->
>-------------------------------------------------------------------------------
--------------------------------------------------------------|
| |
| To: ids@iiug.org |
| cc: |
| Subject: Moving database informix from Win NT4 to Linux 7.2 [844] |
| |
>-------------------------------------------------------------------------------
--------------------------------------------------------------|
Hi Everyone!
I was exported database with the name 'A' --> 'A.exp' on Windows NT 4.0
(Informix 9.3 TC2).
Then I was imported to Red Hat Linux 7.2(Informix 9.3 UC1) but error:
"Load file has different number of column than table".
I don't know this error.
Any idea ?
Thanks.
Did you did an update statistics on the NT4 DB before exporting
the Database?
-----Originalnachricht-----
Von: Eric Washal....
An: ids@iiug.org
Gesendet: 04.04.03 18:36
Betreff: RE: Moving database informix from Win NT4 to Linux 7.2 [852]
dexport? what parameters? and how did you transfer the files from the
windows env to the linux env? What table does the dbimport have issue
with?
Look at the load file and see if there truly is a difference in
values...
-----Original Message-----
From: NGUYEN VAN HIEU [mailto:hieuid@yahoo.com]
Sent: Friday, April 04, 2003 12:21 AM
To: ids@iiug.org
Subject: Moving database informix from Win NT4 to Linux 7.2 [844]
Hi Everyone!
I was exported database with the name 'A' --> 'A.exp' on Windows NT
4.0(Informix 9.3 TC2).
Then I was imported to Red Hat Linux 7.2(Informix 9.3 UC1) but error:
"Load file has different number of column than table".
I don't know this error.
Any idea ?
Thanks.
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.