View previous topic :: View next topic
|
Author |
Message |
sonali12_9
New User
Joined: 13 Feb 2009 Posts: 20 Location: United States of america
|
|
|
|
I have a mainframe job which updates the DB2 table. Sometimes users runs query againgst this DB2 table and mainframe job will wait for locks and finally abends due to time out error. Then we ask DBA to purge the user's session and i will restart job.
Is it possible that before mainframe job starts, i can put some check if any user is using table and purge the particular session. |
|
Back to top |
|
|
Tushar Sood
New User
Joined: 26 Oct 2008 Posts: 14 Location: New Jersey
|
|
|
|
Hi,
I don't have a solution to your problem, but wanted to share a similar problem happening at our place.
After which we (the users) started using the DB2 queries with "With UR" clause. This prevented the deadlocks.
Though we had a limitation of just using the Select Queries. |
|
Back to top |
|
|
Peter Nancollis
New User
Joined: 15 Mar 2011 Posts: 47 Location: UK
|
|
|
|
You dont say what is being used for the query. Some of the options in, say SPUFI, can be quite restrictive in a "sharing" environment - even when the query has completed!
UR will give relief of "dirty reads" are acceptable
Problem with checking first is what happens if something sneaks in between the check and the job ?
If it a critical updater consider LOCKing the table ... but may cause more problems than it solves! |
|
Back to top |
|
|
devd
New User
Joined: 19 Mar 2009 Posts: 11 Location: Chennai
|
|
|
|
You need to do specify WITH UR within your SQL query or even you can go for certain changes in your schid using the scheduler so that both jobs aren't being run at same time. |
|
Back to top |
|
|
bhairon singh rathore
New User
Joined: 19 Jun 2008 Posts: 91 Location: banglore
|
|
|
|
Better ask your DBA abt using UR.......Deadlock problem can be solved or reduced by scheduling the jobs in much organised way.....
We had a similar problem sometime back and we used partitioned table.....so that till todays date data get inserted......last updated date data remains active in one partition and after completion of insertion of data in next partition last date data becomes inactive and new one as active......but this all depends upon architecture of your application |
|
Back to top |
|
|
|