iploader
Posted in 1998
It was recently called to my attention that the high performance loader has
a bug which 'limits' the length of the table name to 9 characters. Yes it
is a bug (one I reported about 17 months ago). What is occuring is that in
the maps table of the onpload database, the table name is registered as
'owner.tabname'. There is even room for the owner here - the field is 27
long, but the ipload and onpload jobs only use the first 18 characters of
the name (they don't expect owner). Hence it looks like it only supports 9
characters. To fix this it is necessary to remove the owner from the table
name in the maps table. The following shell will do this for you. (I
haven't tested the update part).
#!/bin/ksh
# update the onpload database, remove 'owner' from the maps.qtable column
# Function to update the maps table
fixonp()
{
dbaccess onpload - <<!
update maps set qtable = '$2' where qtable = '$1.$2';!
}
# get a list of all values from qtable where the owner is there.
dbaccess onpload - 2>/dev/null << !
unload to junk.tmp select qtable from maps where qtable matches "*.*";!
# remove the field seperator
sed s/\\|// junk.tmp > junk2.tmp
# for each value
cat junk2.tmp |
while read line
do
# split out owner and table name
own=`echo $line | cut -f1 -d.`
tab=`echo $line | cut -f2 -d.`
# call the update function
fixonp $own $tab
done
rm junk.tmp junk2.tmp
cheers
j.