Dbexport/Import NT to solaris
Posted in 2001
Topics: Migration, Import/Export & Data Conversion, Platform-Specific Issues
Hi everyone
--------
I post a question last December as following:
I got problem when try to dbimport a database which is dbexported from
informix on NT into IDS 2000 on Solaris.
The error message of dbimport is:
load file has different number of columns than table.
I check the files under *.exp in solaris, exactly the same size as *.exp in
NT, I copy through use FTP.
What is wrong here?
-------
OK. I know what is wrong. It is CR/LF to LF problem. On NT box, when I do
dbexport, the exported *.unl files have CR/LF as end line, but unix requires
LF as end line when I do dbimport.
Does anyone know how to do the mapping? or how to change behavior of NT or
Unix box.
Regards
Andy Jiang
Andy Jiang wrote in message ...
>
>I check the files under *.exp in solaris, exactly the same size as *.exp in
>NT, I copy through use FTP.
>
>.....
>
>OK. I know what is wrong. It is CR/LF to LF problem. On NT box, when I do
>dbexport, the exported *.unl files have CR/LF as end line, but unix
requires
>LF as end line when I do dbimport.
>Does anyone know how to do the mapping? or how to change behavior of NT or
>Unix box.
If you are using FTP, make sure you are NOT using BINARY mode. Try issuing
the command
ascii
or
binary off
or whatever it takes to convince your FTP client to do text-based transfer.
I suppose this could also depend somewhat on the FTP server "at the other
end" so if you have no satisfaction FTP'ing in one direction, then try
connecting from the NT to the UNIX and putting the files rather than getting
from the NT. Don't forget to issue that ascii command... You may also need
to setup the FTP server on the UNIX in this case.
If you still can't get satisfaction, and you have perl on the UNIX machine,
try this:
perl -pi -e 's/\\r//' *.unl
in the .exp directory. Take extra special care to type that command line
EXACTLY, including the spaces and don't add any spaces.
Hope that works for you.
Thanks all for quick response, tranfering in ASICC mode solves my problem.
Regards
Andy Jiang
"Andy Jiang" <ajiang@mail.lumley.co.nz> wrote in message
news:UUu86.393$nfe.11993257@news.xtra.co.nz...
> Hi everyone
> --------
> I post a question last December as following:
> I got problem when try to dbimport a database which is dbexported from
> informix on NT into IDS 2000 on Solaris.
>
> The error message of dbimport is:
> load file has different number of columns than table.
>
> I check the files under *.exp in solaris, exactly the same size as *.exp
in
> NT, I copy through use FTP.
>
> What is wrong here?
> -------
>
>
> OK. I know what is wrong. It is CR/LF to LF problem. On NT box, when I do
> dbexport, the exported *.unl files have CR/LF as end line, but unix
requires
> LF as end line when I do dbimport.
> Does anyone know how to do the mapping? or how to change behavior of NT or
> Unix box.
>
> Regards
>
> Andy Jiang
>
>
>