I have two tables, let's call them A and B.
I have a view, call it V, which is defined as:
SELECT * FROM A, B WHERE A.ID = B.ID
Now I have an application #1 that has to update A and B. So I did an update to A, then I updated B.
It's a live system, though, so in middle, applicatoin #2 asked for "select * from V".
SQL0911 rc=2. From the event monitor, I can see that #1 has a lock on A, #2 has a lock on B.
I have re-written #1 so it updates B then A, but it occurs to me that I have no guarantee from DB2 that "select * from V" will always get lock B before A. In fact the way the view is defined suggests the opposite.
Help.
