Rollback with dbload, How?
Posted in 1996
Hi,
I have a shell script for data loading process. I would like
the online engine to rollback if there is an error in loading
process. I tried several ways for this:
method 1:
inputSize=$(wc -l $file | awk '{print $1}'}
dbload -d database -c spec.com -l err -e 10 -n $inputSize.
since I wanted dbload to commit at the size of input. This is not
working well.
method 2:
create temp table;
load data into temp table with dbload command, if fails
exit with error.
write an esqlc program to insert rows from temp table into
dest_table. Do this within transaction.
second method seems to be working ok. But it is ugly, as any body can
tell. Is there an alternative way to do the job.
Thanks for your suggestions.
Regards.
Siva pothireddy
siva@hogpa.att.com