Lock against Inserts

2002-07-25 Thread Bill Buchan
I have a transaction which issues LOCK TABLE TABLE IN EXCLUSIVE MODE. This is to prevent INSERTs during processing. However this is way too restrictive - we only need to restrict certain types of insert, eg. where col1 = 123. I can do something like SELECT * FROM TABLE WHERE col1 = 123

Fwd: Lock against Inserts

2002-07-25 Thread Bill Buchan
Aha! Just seen the DBMS_LOCK example in Thomas Kyte's book where he does pretty much what I need (i.e. request a lock on hash(123) before the transaction starts). Still requires setting up a trigger, which I'd hoped to avoid, but if you need to do it this way, it's gotta go in! Thanks -