Are there any good resources to explain how to prevent locking for DB2 databases? I'm already seeing signs of locking between the application, triggers, and selects. And we're only in test mode.
Diagram
App --> Table1a Table2a Table3a Table4a Table5a
|
|
--> Table1b Table2b Table3b Table4b Table5b
The Application INSERTS data into Table1a & 1b simultaneously, then when done with that load, flags another table, and which triggers a data move. From delete 5, 4->5, 3->4, 2->3..... then deletes the group out of both 1 tables. Have Table 1 serve as the temp table for the app to INSERT in.
The issue i am VERY concerned with, is the app will continue to process data into the TEMP table and their will be a lock on the table so either the app wont be able to insert or the TRIGGER won't be able to delete from.
If the app and trigger do record locking this shouldnt be a problem, bc hypothetically they wont be the same records. However the Trigger should always get priority over the app, make the app wait then insert.
Is this going to be possible? Can you give locking priority to one over the other? Can you force control over a lock? Can you do this in a trigger? Appreciate any insight or direction to more info. No more DBA's in this group left to bounce ideas off of. Thanks,
Charlie.