> Question 1)
> 
> I've got a update trigger on a table that updates a record in another
> table.
> 
> i.e.
> 
> CREATE OR REPLACE TRIGGER table1_trigger_update
> BEFORE UPDATE ON table1
> FOR EACH ROW
> BEGIN
> 
>     UPDATE
>         Table2
>     SET
>         Table2.version = Table2.version + 1
>     WHERE
>         Table2.job_id = :new.job_id;
>         
> END;
> 
> The question is - at what stage does Oracle attempt to get a lock in the
> table referenced in the trigger? Does Oracle attempt to lock the Table2
> row at the same time as locking the Table1 row, or does it attempt to lock
> when the COMMIT is finally done?
> 
> Question 2)
> 
> When there is a deadlock situation is it the bit of SQL that starts the
> deadlock that gets the exception? This is the way I thought it worked, but
> I'm sure I've seen different bits of code getting the exception in
> identical circumstances.
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: John Dunn
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

Reply via email to