MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Dead lock abend -911

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database
View previous topic :: View next topic  
Author Message
vijayakumar8303
Beginner


Joined: 21 Oct 2005
Posts: 26
Topics: 15

PostPosted: Fri Oct 19, 2007 6:20 am    Post subject: Dead lock abend -911 Reply with quote

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
View user's profile Send private message Send e-mail
vkphani
Intermediate


Joined: 05 Sep 2003
Posts: 483
Topics: 48

PostPosted: Fri Oct 19, 2007 6:27 am    Post subject: Reply with quote

vijaykumar,
check the below link.
http://www.mvsforums.com/helpboards/viewtopic.php?t=5542&highlight=avoid+deadlock
Back to top
View user's profile Send private message Send e-mail
vijayakumar8303
Beginner


Joined: 21 Oct 2005
Posts: 26
Topics: 15

PostPosted: Fri Oct 26, 2007 2:03 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
vivek1983
Intermediate


Joined: 20 Apr 2006
Posts: 222
Topics: 24

PostPosted: Fri Oct 26, 2007 2:08 am    Post subject: Reply with quote

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
View user's profile Send private message
vijayakumar8303
Beginner


Joined: 21 Oct 2005
Posts: 26
Topics: 15

PostPosted: Fri Oct 26, 2007 2:13 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
vijayakumar8303
Beginner


Joined: 21 Oct 2005
Posts: 26
Topics: 15

PostPosted: Fri Oct 26, 2007 2:17 am    Post subject: Reply with quote

If I uncomment that portion of reading the table with uncommited read in the second program. Will that workout?
Back to top
View user's profile Send private message Send e-mail
vivek1983
Intermediate


Joined: 20 Apr 2006
Posts: 222
Topics: 24

PostPosted: Fri Oct 26, 2007 2:24 am    Post subject: Reply with quote

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
View user's profile Send private message
vijayakumar8303
Beginner


Joined: 21 Oct 2005
Posts: 26
Topics: 15

PostPosted: Fri Oct 26, 2007 3:57 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
vijayakumar8303
Beginner


Joined: 21 Oct 2005
Posts: 26
Topics: 15

PostPosted: Fri Oct 26, 2007 6:54 am    Post subject: Reply with quote

hi can anybody with the second one above
Back to top
View user's profile Send private message Send e-mail
vijayakumar8303
Beginner


Joined: 21 Oct 2005
Posts: 26
Topics: 15

PostPosted: Sat Oct 27, 2007 11:15 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
jsharon1248
Intermediate


Joined: 08 Aug 2007
Posts: 291
Topics: 2
Location: Chicago

PostPosted: Mon Oct 29, 2007 11:14 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group