By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,199 Members | 1,551 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,199 IT Pros & Developers. It's quick & easy.

Commits on sql questions

P: n/a
Using 6.1, Copying data in one large table to another using sql
and do not know how to issue a commit. (say every 5000 records)
to keep the log files from filling up.

I can find no informations on this...
db2load is not practical here.
Nov 12 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
"Al Murry" <am****@northtech.net> wrote in message
news:pa****************************@northtech.net. ..
Using 6.1, Copying data in one large table to another using sql
and do not know how to issue a commit. (say every 5000 records)
to keep the log files from filling up.

I can find no informations on this...
db2load is not practical here.


Are you sure you can't do an export (with an SQL statement you provide) and
then an import to insert the rows with a commit interval?

If not, you will need to open a select cursor in your program WITH HOLD
option (keeps cursor open even after a commit), fetch the row one at a time,
then insert into other table for each row fetched, then commit at the
desired interval.
Nov 12 '05 #2

P: n/a
On Mon, 20 Oct 2003 16:27:37 +0000, Mark A wrote:
"Al Murry" <am****@northtech.net> wrote in message
news:pa****************************@northtech.net. ..
Using 6.1, Copying data in one large table to another using sql
and do not know how to issue a commit. (say every 5000 records)
to keep the log files from filling up.

I can find no informations on this...
db2load is not practical here.


Are you sure you can't do an export (with an SQL statement you provide) and
then an import to insert the rows with a commit interval?


"with a commit interval" Thats what I cannot find is how to commit
after every nnn rows.

TS
Nov 12 '05 #3

P: n/a
> >> Using 6.1, Copying data in one large table to another using sql
and do not know how to issue a commit. (say every 5000 records)
to keep the log files from filling up.

I can find no informations on this...
db2load is not practical here.


Are you sure you can't do an export (with an SQL statement you provide) and then an import to insert the rows with a commit interval?


"with a commit interval" Thats what I cannot find is how to commit
after every nnn rows.

TS


COMMITCOUNT n
Performs a COMMIT after every n records are imported.

This is for the import utility on DB2 UDB for Linux, Unix, and Windows
Version 7 or 8 (I don't know anything about version 6, which I believe is
unsupported).

If writing your own SQL, you must code the logic yourself.
Nov 12 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.