DB2 COMMIT??



IBM's flagship relational database management system

DB2 COMMIT??

Postby ninudvictor » Mon Oct 20, 2008 9:36 pm

Hi All,
I am doing UPDATE in two tables in a single program (Program with Checkpoint Restart Logic).
I want to commit the changes after processing five records.So is it reuired to mention two COMMIT
to save the changes in two different table?

My question is - If there are 'n' no. of tables to be updated, is it reuired to give 'n' no. of
EXEC SQL
COMMIT WORK
END-EXEC
?
Or only one COMMIT is sufficient to save all the changes made to 'n' no. of tables.

Many Thanks in advance.
Nihar
ninudvictor
 
Posts: 7
Joined: Thu Oct 09, 2008 1:40 pm
Has thanked: 0 time
Been thanked: 0 time

Re: DB2 COMMIT??

 

Re: DB2 COMMIT??

Postby dick scherrer » Tue Oct 21, 2008 2:58 am

Hello,

One COMMIT handles everything that has been added/deleted/changed since the last checkpoint.

If you are implementing checkpoint/restart, keep in mind that files other than database tables must be syncronized on a restart. This is also tru of any report(s) being created by the process.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times


Return to DB2

 


  • Related topics
    Replies
    Views
    Last post