> You might want to use the load from cursor functionality.
>
> declare cursor mycur as select * from stockmovements where date <
> xxxxxxx
> load from mycur of cur insert into stockmovements_history
>...
> > You might want to use the load from cursor functionality.
> >
[quoted text clipped - 7 lines]
> but...i don't know if i can launch this kind of "script" from SQL or
> from a SQL-Stored Procedure.
Unfortunately not - both are CLP commands, not SQL statements.
> or using ADMIN_CMD( script )?
In version 8, no (8's ADMIN_CMD can only call DESCRIBE, EXPORT, PRUNE,
REORG, RUNSTATS, and UPDATE DB CFG). In version 9, sort of - you
couldn't do DECLARE CURSOR, but you could call ADMIN_CMD('EXPORT...')
followed by ADMIN_CMD('LOAD...'). The file used for the data would be
sat on the server by virtue of ADMIN_CMD (i.e. there wouldn't be lots
of network traffic involved).
Going back to your original post: are you unable to increase the log
size for some reason? (or possibly increase LOGSECOND to allow for
sufficient secondary logs to be allocated if/when necessary).
As for EXPORT+LOAD - you can use them both when others are connected to
the database - EXPORT in particular, which is effectively no different
to a normal query. However, LOAD does make the target table
inaccessible at least for the duration of the load (and possibly
afterward in the case of things like Check Pending states).
Cheers,
Dave.