View previous topic :: View next topic
|
Author |
Message |
arunpvarier
New User
Joined: 07 Nov 2006 Posts: 16 Location: banglore
|
|
|
|
Suppose there are 1000 rows in a table.A program that updates 100 rows of that table. after updating 99 rows, an error occured at the 100th row. what will happens? there is no updation will occur but the confusion is that no updation, (commit/ rollback)?
no updation , commit?
OR
no updation, rollback?
which will happen? |
|
Back to top |
|
|
guptae
Moderator
Joined: 14 Oct 2005 Posts: 1208 Location: Bangalore,India
|
|
|
|
Hi There,
I think it will be no updation, rollback if we do not have any explicit commit in r program
Corrections r welcome |
|
Back to top |
|
|
Farooq
New User
Joined: 24 Nov 2006 Posts: 15 Location: Chennai
|
|
|
|
HI
I too agree with Ekta
Thanks!
Farooq |
|
Back to top |
|
|
arunpvarier
New User
Joined: 07 Nov 2006 Posts: 16 Location: banglore
|
|
|
|
hai
Thanks for the reply
arun |
|
Back to top |
|
|
Sarva_bubli
New User
Joined: 09 Aug 2006 Posts: 37 Location: Pune, India
|
|
|
|
It will be no updation and rollback. |
|
Back to top |
|
|
leo_sangha
New User
Joined: 11 Aug 2005 Posts: 85 Location: England
|
|
|
|
In this case when there is an error in 100th row ..
What is happening to the job is it abending or completing with CC=00?
Because i believe if you are using Rollback in the code then
No Updation & Rollback will happen if job ends successfully?
Updation will happen till the 99th row if you are abending the job? |
|
Back to top |
|
|
kgumraj
Active User
Joined: 01 May 2006 Posts: 151 Location: Hyderabad
|
|
|
|
Hi,
As of I know, for a single program if Commis not specified, the program commits at last. That means only when there is RC of 0 or 4.
To tell how does the roll back really work in DB2
For every insertion and updation in the table there creates a log that is used internally by the DB2. When ever you get abend then the log will be revented back so that the previous stable database is maintained.
If a succefull insertion or updation, the log will be automatically deleted and that will be your stable database at present. |
|
Back to top |
|
|
ramupinnu
New User
Joined: 10 Apr 2006 Posts: 4 Location: Bangalore
|
|
|
|
If there is a exclusive commit statement in the program then upto 99 records will be updated.otherwise no records will be updated |
|
Back to top |
|
|
|