Error in dbimport
Posted in 2011
A user moving a dbexport dump from Informix 9.40 on Windows 2003 to 9.40 on SUSE Linux hit "Load file has different number of columns than table" during dbimport. Respondents suggested the usual causes: Windows CR/LF line endings surviving the file transfer, or embedded pipe/newline characters in the data (checkable by loading the offending table in a test instance). The poster ran dos2unix on all the unload files and the import then worked.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
Topics: Migration, Import/Export & Data Conversion, Platform-Specific Issues
Hi, I am trying to import a database on the SUSE linux machine Informix version 9.40.UC5. While importing it throws a message saying: "Load file has different number of columns than table Do you want to abort?" The server from which the export is taken is a Windows Server 2003 R2 Std. SP2 32-Bit with informix version: 9.40.TC4 Total Size: 13,2GB Used Size: 13,01GB Thanks in advance.
how was the file trasferred? May be a Carriage Return - Line Feed problem
between Windows and Unix ASCII Files
regards,
Jörg Volz
---------------------------------------------
-----Ursprüngliche Nachricht-----
Von: ids-bounces@iiug.org im Auftrag von SUSHANT KODE
Gesendet: Do 24.02.2011 10:16
An: ids@iiug.org
Betreff: Error in dbimport [22897]
Hi,
I am trying to import a database on the SUSE linux machine Informix version
9.40.UC5. While importing it throws a message saying:
"Load file has different number of columns than table
Do you want to abort?"
The server from which the export is taken is a Windows Server 2003 R2 Std. SP2
32-Bit with informix version: 9.40.TC4
Total Size: 13,2GB Used Size: 13,01GB
Thanks in advance.
*******************************************************************************
Forum Note: Use "Reply" to post a response in the discussion forum.
IT Handel und Beratung Jörg Volz
Bernhard-Früh-Str. 7
77855 Achern
GERMANY
Tel: +49 (0)7841-681651
Fax: +49 (0)7841-681654
Mobil: +49 (0)170-2989757
VAT-ID: DE201383541
http://www.it-volz.de
Have you checked the file and the table to ensure that the number of columns
are the same? I assume you are pipe sign ( | ) delimiting? If so check for
pipe signs in the actual
data. It has been known. If you are using a different delimiter then check for
that in the data. Another trick is to take the table and the file into a test
instance and try and load it.
You will soon find the offending row and can then work out what has happened.
Good luck.
> To: ids@iiug.org
> From: ksushants@gmail.com
> Subject: Error in dbimport [22897]
> Date: Thu, 24 Feb 2011 04:12:32 -0500
>
> Hi,
>
> I am trying to import a database on the SUSE linux machine Informix version
> 9.40.UC5. While importing it throws a message saying:
>
> "Load file has different number of columns than table
> Do you want to abort?"
>
> The server from which the export is taken is a Windows Server 2003 R2 Std.
SP2
> 32-Bit with informix version: 9.40.TC4
>
> Total Size: 13,2GB Used Size: 13,01GB
>
> Thanks in advance.
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
Hi, when copying text files from windows, to linux platform, you must convert the carriage return, using the dos2unix shell application. Check if its installed, if not, you´ll have to do it before converting your export file. Then, you should load it without any issues. If there is another issue after that, you could just ask us, ok? Best regards. Em 24/02/2011 05:12, SUSHANT KODE escreveu: > Hi, > > I am trying to import a database on the SUSE linux machine Informix version > 9.40.UC5. While importing it throws a message saying: > > "Load file has different number of columns than table > Do you want to abort?" > > The server from which the export is taken is a Windows Server 2003 R2 Std. SP2 > 32-Bit with informix version: 9.40.TC4 > > Total Size: 13,2GB Used Size: 13,01GB > > Thanks in advance. > > > ******************************************************************************* > Forum Note: Use "Reply" to post a response in the discussion forum. > > -- Alexandre Marini Tecnologia da Informação - DBA msn: alexandre_marini@hotmail.com SEFAZ-MS / SGI-UGSR / Sistemas IBM-Informix Cert-Info-Mgmt_color <Cert-Info-Mgmt_color.jpg> IBM Certified System Administrator - Informix Dynamic Server V10 / V11 <http://www.iiug.org/conf/2011/iiug/>
Usually this happens when some row in one of the load files has an embedded pipe character or newline character. Art Art S. Kagel Advanced DataTools (www.advancedatatools.com) IIUG Board of Directors (art@iiug.org) Blog: http://informix-myview.blogspot.com/ Disclaimer: Please keep in mind that my own opinions are my own opinions and do not reflect on my employer, Advanced DataTools, the IIUG, nor any other organization with which I am associated either explicitly, implicitly, or by inference. Neither do those opinions reflect those of other individuals affiliated with any entity with which I am affiliated nor those of the entities themselves. On Thu, Feb 24, 2011 at 4:12 AM, SUSHANT KODE <ksushants@gmail.com> wrote: > Hi, > > I am trying to import a database on the SUSE linux machine Informix version > 9.40.UC5. While importing it throws a message saying: > > "Load file has different number of columns than table > Do you want to abort?" > > The server from which the export is taken is a Windows Server 2003 R2 Std. > SP2 > 32-Bit with informix version: 9.40.TC4 > > Total Size: 13,2GB Used Size: 13,01GB > > Thanks in advance. > > > > ******************************************************************************* > Forum Note: Use "Reply" to post a response in the discussion forum. > > --0015175113e6b632cf049d06f7d1
Thanks all, I ran dos2unix for all files and it is working now.