IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

-911 SQL code in DB2


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
dsbhati

New User


Joined: 13 Jun 2005
Posts: 10
Location: india

PostPosted: Tue Jun 21, 2005 9:47 am
Reply with quote

I am regularly getting SQL Error -911 in production , my suspect is that same time batch and online is using the tables. what could be permanent solution ?
could any body give me same suggestion?.

Thanks and regards
Darshan
Back to top
View user's profile Send private message
kirankumar.k

New User


Joined: 21 Jun 2005
Posts: 1

PostPosted: Tue Jun 21, 2005 12:55 pm
Reply with quote

Please check this: ibmmainframes.com/references/a2.html#-911
Back to top
View user's profile Send private message
MGIndaco

Active User


Joined: 10 Mar 2005
Posts: 432
Location: Milan, Italy

PostPosted: Tue Jun 21, 2005 1:55 pm
Reply with quote

In which kind of operation you have -911?
Back to top
View user's profile Send private message
sudheer648

New User


Joined: 23 May 2005
Posts: 97
Location: Chennai

PostPosted: Tue Jun 21, 2005 5:12 pm
Reply with quote

Hi ,

Resource Contention.
Back to top
View user's profile Send private message
kanak

Moderator


Joined: 12 Mar 2005
Posts: 252
Location: India

PostPosted: Tue Jun 21, 2005 6:19 pm
Reply with quote

Manual Says

-911 ==> THE CURRENT UNIT OF WORK HAS BEEN ROLLED BACK DUE TO DEADLOCK OR TIMEOUT. REASON reason-code, TYPE OF RESOURCE resource-type, AND RESOURCE NAME resource-name

What Sudheer has said is correct.
Back to top
View user's profile Send private message
chiranjeev

New User


Joined: 20 Jun 2005
Posts: 2
Location: MYSORE

PostPosted: Tue Jun 21, 2005 7:42 pm
Reply with quote

permanent sollution can be , if u have autority u can
reschedule the time of batch jobs in CNTRL+M.
this abend is due to resource contention as pointed out by kANAK AND SUDHEER.
Back to top
View user's profile Send private message
dsbhati

New User


Joined: 13 Jun 2005
Posts: 10
Location: india

PostPosted: Thu Jun 23, 2005 9:46 am
Reply with quote

Hi all,

thanks for ur help i know the reason is resource contention. and also running of batch and online program at same time of using same table. But changing batch job timing is not a solution coz again we don't know when will online transcation can happen.

Could anybody help me out regarding this??
Can we check -911 in program and use delay(time) cics command??
or in batch can commit help in this case after updation???


Thanks & Regards,
Darshan
Back to top
View user's profile Send private message
sree_2503

New User


Joined: 22 May 2005
Posts: 12
Location: Chennai,India

PostPosted: Thu Jun 23, 2005 9:58 am
Reply with quote

Hi,

There might be two cases from this lead -

1) Either ur online program is calling a subroutine where the cursor is fetching the rows from the same table as being used by the Batch program.

2) The Online program directly retrieves rows from the table.

For both the cases, u can use

EXEC CICS
DELAY INTERVAL(NN)
END-EXEC

say, NN=02,03...

before the fetch operation. But in case no 1, u can make use the call type based on Synchronous/Asynchronous and then can use the delay command.

Hope this helps.
Back to top
View user's profile Send private message
dsbhati

New User


Joined: 13 Jun 2005
Posts: 10
Location: india

PostPosted: Thu Jun 23, 2005 10:19 am
Reply with quote

THANKS SREE

COULD U TELL ME ABOUT IST CASE ,MEANS WHAT SYNCHRONOUS/ASYNCHRONOUS CALL??

Thanks
Darshan
Back to top
View user's profile Send private message
basic

New User


Joined: 15 Feb 2006
Posts: 2

PostPosted: Wed Feb 15, 2006 8:33 pm
Reply with quote

Can any one show example how to overcome Please
Back to top
View user's profile Send private message
basic

New User


Joined: 15 Feb 2006
Posts: 2

PostPosted: Wed Feb 15, 2006 8:37 pm
Reply with quote

Sorry again iam using tELON COBOL IMS DB2 / DC programs , could you help in overcome this
Back to top
View user's profile Send private message
robertolima

New User


Joined: 15 Feb 2006
Posts: 1

PostPosted: Wed Feb 15, 2006 10:59 pm
Reply with quote

Try COMMIT for each 100 rows (Insert or Update).
Back to top
View user's profile Send private message
ragshere

New User


Joined: 20 Dec 2004
Posts: 70

PostPosted: Sat Feb 18, 2006 5:51 pm
Reply with quote

Hi,
Hope this will work

1. change the lock size to 'ROW' for all the tablespaces( tables) used in batch job program. here LOCKSIZE is a tablespace property.

2. do a RUNSTATS on all tabalespaces(tables) used by the batch program and mainly tables on which contention occured.

3. bind the batch program package/plan with isolation level CS and
deallocate bind parameter as COMMIT.

You need to do all these 3 steps. then you won't hit with -911.


Thanks
Rags
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts run rexx code with jcl CLIST & REXX 15
No new posts Compile rexx code with jcl CLIST & REXX 6
No new posts REXX code to expand copybook in a cob... CLIST & REXX 2
No new posts VSAM return code 23 - for a Random read COBOL Programming 4
No new posts Monitoring production job progress. N... JCL & VSAM 4
Search our Forums:

Back to Top