If I keep the FIRST statement for Table 1, I receive the QVX error when script reaches Table2. If I comment out the FIRST statement, everything works fine.
As a workaround I figured out to use
disconnect; Connect... ;
between the tables. The script works fine.
Tried sleep 60000, did not help.
What do you think, is it a bug or do I miss something?