View previous topic :: View next topic |
Author |
Message |
vijayakumar8303 Beginner
Joined: 21 Oct 2005 Posts: 26 Topics: 15
|
Posted: Fri Oct 19, 2007 6:20 am Post subject: Dead lock abend -911 |
|
|
Hi,
I have an abend due to dead lock -911 as two jobs are simultaneously accessing the same database. I want to know what are the things that I can do for preventing this apart from making the SCHEDULING changes |
|
Back to top |
|
 |
vkphani Intermediate

Joined: 05 Sep 2003 Posts: 483 Topics: 48
|
|
Back to top |
|
 |
vijayakumar8303 Beginner
Joined: 21 Oct 2005 Posts: 26 Topics: 15
|
Posted: Fri Oct 26, 2007 2:03 am Post subject: |
|
|
Hi,
One of my program does 3 uncommited reads, 2 updates without hold and insert against a table X when a second program tries to do a read without uncommited read the second program is failing with -911. Please let me know what i can do to prevent this problem from happening |
|
Back to top |
|
 |
vivek1983 Intermediate

Joined: 20 Apr 2006 Posts: 222 Topics: 24
|
Posted: Fri Oct 26, 2007 2:08 am Post subject: |
|
|
vijayakumar8303,
Quote: |
when a second program tries to do a read without uncommited read the second program is failing with -911.
|
Just curious.. Did you try changing "the read with UR" in the second program? _________________ Vivek G
--------------------------------------
A dream is just a dream. A goal is a dream with a plan and a deadline. (Harvey Mackay) |
|
Back to top |
|
 |
vijayakumar8303 Beginner
Joined: 21 Oct 2005 Posts: 26 Topics: 15
|
Posted: Fri Oct 26, 2007 2:13 am Post subject: |
|
|
Hi,
I did not try for that but I see that in the second program previously there was an uncommited read a long back but right now it has been commented out. I uncomment that will that work? |
|
Back to top |
|
 |
vijayakumar8303 Beginner
Joined: 21 Oct 2005 Posts: 26 Topics: 15
|
Posted: Fri Oct 26, 2007 2:17 am Post subject: |
|
|
If I uncomment that portion of reading the table with uncommited read in the second program. Will that workout? |
|
Back to top |
|
 |
vivek1983 Intermediate

Joined: 20 Apr 2006 Posts: 222 Topics: 24
|
Posted: Fri Oct 26, 2007 2:24 am Post subject: |
|
|
vijayakumar8303 wrote: | Hi,
I did not try for that but I see that in the second program previously there was an uncommited read a long back but right now it has been commented out. I uncomment that will that work? | vijayakumar8303,
My guess is YES. It will work. Because what happens is that the second program is trying to read the data which is being locked by the first program.
But you should also remember that "UR" also is called as "Dirty read" meaning that will give you the records which are yet to be updated. If program1 rollbacks the update (Or if program1 abends after updating without commiting) chances are like program2 will read the incorrect data.
You should ensure that the data you are reading in program2 is not sensitive enough to prevent a dirty read.
Does this make sense?! _________________ Vivek G
--------------------------------------
A dream is just a dream. A goal is a dream with a plan and a deadline. (Harvey Mackay) |
|
Back to top |
|
 |
vijayakumar8303 Beginner
Joined: 21 Oct 2005 Posts: 26 Topics: 15
|
Posted: Fri Oct 26, 2007 3:57 am Post subject: |
|
|
Hi Vivek,
Thanks a lot. Have one similar kind of issue Program A is doing insert into TABLE X and program B is doing two selects wtih HOLD using cursor and 2 updates. I am having probelem with the program B abending with -911. Please let me know how we can fix this. |
|
Back to top |
|
 |
vijayakumar8303 Beginner
Joined: 21 Oct 2005 Posts: 26 Topics: 15
|
Posted: Fri Oct 26, 2007 6:54 am Post subject: |
|
|
hi can anybody with the second one above |
|
Back to top |
|
 |
vijayakumar8303 Beginner
Joined: 21 Oct 2005 Posts: 26 Topics: 15
|
Posted: Sat Oct 27, 2007 11:15 pm Post subject: |
|
|
Hi For the first one my DBA is suggesting me to COMMIT my updates in program A oftern. I want to know how would it help me solving -911. |
|
Back to top |
|
 |
jsharon1248 Intermediate
Joined: 08 Aug 2007 Posts: 291 Topics: 2 Location: Chicago
|
Posted: Mon Oct 29, 2007 11:14 am Post subject: |
|
|
When you issue a COMMIT, you are telling DB2 that you are done with a unit of work and you want to make your changes permanent. Several actions take place when you issue a COMMIT, one of them being that DB2 releases locks on resources that you've updated. By releasing the locks, you're increasing concurrency. However, there is a cost incurred for each COMMIT. So you want to COMMIT frequently if one of your goals is to improve concurrency, but not so frequently that the cost of the COMMITs has a detrimental effect on your process. If your DBA is telling you to increase your COMMIT frequency, that's what you need to do. Ask the DBA for a target COMMIT frequency and shoot for that. |
|
Back to top |
|
 |
|
|