Load from external table issues
Posted in 2019
Topics: Migration, Import/Export & Data Conversion, Platform-Specific Issues
Dear All,
I am doing unload/load to external tables in order to speed up the process of
dbexport/dbimport for huge tables. However, I get an error
26168: Conversion err:(file,offset,reason,col)=(xxxx)so my assumption is that we have some data in the char fields in the tables
that is recognized as delimiter
Source and destination systems are the same, Informix 11.7FC 4 on AIX 7.1,
same environment, same pretty much everything. We have tried few options for
the delimiter sign (including format "informix" ) but no luck. Any idea how to
bypass this behavior.
Actually there is some special data in the char columns such as \\
\\\\t that are
causing troubles.
Here are the export import commands used:
UNLOAD
set pdqpriority 80;
drop table if exists glb_stavka_in_ext;
create external table glb_stavka_in_ext
sameas glb_stavka_in
using (
datafiles (
'DISK:/export_dir/migracija_test/unload_na_tabeli/test/glb_stavka_in.unl3'),DELI
MITER '|');
insert into glb_stavka_in_ext
select * from glb_stavka_in where data_valuta < '05-01-2014';
LOAD:
set pdqpriority 80;
drop table if exists glb_stavka_in_ext;
create external table glb_stavka_in_ext
sameas glb_stavka_in
using (
datafiles
('DISK:/export_dir/migracija_test/unload_na_tabeli/test/glb_stavka_in.unl3'),DEL
IMITER '|',
express);
insert into glb_stavka_in
select * from glb_stavka_in_ext;
We are following the document
https://advancedatatools.com/Downloads/AdvancedDataTools-Webcast-DB_Migrations_2
_MikeWalker.pdf where the syntax is as follows:
set pdqpriority 25;create external table bigtab_ext
sameas bigtab
using (datafiles
("DISK:/migrate/bigtab.unl1",
"DISK:/migrate/bigtab.unl2"),
format "informix");
insert into bigtab_ext
select * from bigtab;
set pdqpriority 25;
drop table if exists bigtab_ext;create external table bigtab_ext
sameas
bigtab_load
using (datafiles
("DISK:/migrate/bigtab.unl1",
"DISK:/migrate/bigtab.unl2"),
format "informix");
alter table bigtab_loadtype (raw);
insert into bigtab_load
select * from bigtab_ext;
Any idea is highly appreciated
Thank you,
Aleksandar
The external table files should have all the DELIMITER and RECORDEND characters properly escaped. Are you copying the files between servers? Is the database encoding the same for the origin and destination? What are the DB_LOCALE and CLIENT_LOCALE environment variables set to ? Best regards, Luis Marques
Hi Luis
Yes we are copying the files between servers, DB_LOCALE is set to en_US.819,
CLIENT_LOCALE we don't have set this. After having problem with external
tables by moving files from production to new server (the server we are using
at the moment for testing unload/load to external tables) we done dbexport on
database (on production server) and make dbimport on test server and we try
all of unlaods/loads to/from external tables on test server and here we have
same problem like we have with moving data from production server.
We have try with different DELIMITER but always have same error.