Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

DB2 - Without lock (Update & Read)

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
Arun6578

New User


Joined: 23 Jul 2007
Posts: 9
Location: CBE

PostPosted: Fri Jun 19, 2009 1:42 am    Post subject: DB2 - Without lock (Update & Read)
Reply with quote

Hi,

We are in the process of designing a DB2 database for a Project. The requirement is to update the database during the core business hours with batch job may be with around 200 - 500K records a day. Even during the update and row being updated should not get locked / Slow down at any cost as it may affect the transactional customers. Can you help me with this what type update / Database plan should be designed inorder to avoid lock and unnecessary performance issues....

Any help on this is greatly appreciated
Back to top
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10211
Location: italy

PostPosted: Fri Jun 19, 2009 1:48 am    Post subject: Reply to: DB2 - Without lock (Update & Read)
Reply with quote

it cannot be done,
and it should not even been asked icon_cool.gif
Back to top
View user's profile Send private message
Arun6578

New User


Joined: 23 Jul 2007
Posts: 9
Location: CBE

PostPosted: Fri Jun 19, 2009 1:56 am    Post subject: Reply to: DB2 - Without lock (Update & Read)
Reply with quote

I know there is a isolation level Uncommitted Read. I am really not sure it will help me...
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10211
Location: italy

PostPosted: Fri Jun 19, 2009 2:02 am    Post subject: Reply to: DB2 - Without lock (Update & Read)
Reply with quote

reread Your initial post ( and the subject )
You asked about updates
Back to top
View user's profile Send private message
Arun6578

New User


Joined: 23 Jul 2007
Posts: 9
Location: CBE

PostPosted: Fri Jun 19, 2009 2:06 am    Post subject: Reply to: DB2 - Without lock (Update & Read)
Reply with quote

Yes.. When i update is happening in a database using batch job. If any transaction comes to read the record which is getting updated. The response should be given instead of locking the database.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10211
Location: italy

PostPosted: Fri Jun 19, 2009 2:17 am    Post subject: Reply to: DB2 - Without lock (Update & Read)
Reply with quote

Quote:
... Even during the update and row being updated should not get locked...

and more
Quote:
...can you help me with this what type update...

You seem to lack the basics...
during an update a row is locked ( until a commit is done )

I know that there might be a language barrier,
but repeating the same concept twice is puzzling!

meditate and try understand all the nuances of DB2 locking and ISOLATION levels

anyway on the read side is possible to have a plan where the isolation level is "READ UNCOMMITTED"

but without knowing the details of the application design,
it would not be honest to advice on it
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri Jun 19, 2009 2:19 am    Post subject:
Reply with quote

Hello,

Quote:
If any transaction comes to read the record which is getting updated. The response should be given instead of locking the database.
You need to change the requirement. . .

If the batch job has read a row for update, the online transaction will wait if the online intends to do an update also.

This is not a problem - it is the way database management systems are supposed to work.

It is utter nonsense to plan on multiple processes updating the same resource at the same time. . .

If there is to be a read-only query (no update) online, you can use the "dirty read" (UR) which says there is no concern for the accuracy of the data.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts -913/-911 Deadlock during UPDATE stat... NoSleep319 DB2 5 Fri Nov 18, 2016 12:37 am
No new posts How to update a portion of text in a ... Bill Woodger DFSORT/ICETOOL 25 Wed Nov 09, 2016 9:41 pm
No new posts Updating Cursor row withour using FOR... chandan.inst DB2 15 Tue Nov 08, 2016 11:17 am
No new posts CICS VSAM RLS READ akodakka CICS 3 Tue Oct 04, 2016 3:09 pm
No new posts Multi row fetch - "for read only... Nileshkul DB2 3 Sun Aug 14, 2016 12:52 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us