It gets more complicated under Oracle 9 because initrans has a minimum value of 2 on tables; but under oracle 8, the following should work:
create table t1 initrans 1 maxtrans 1 insert a few dozen rows into t1 so that there are rows in at least two blocks, and commit. session 1 update a row in block 1 session 2 update a row in block 2 session 1 update a row in block 2 -- will wait on a TX/4 session 2 update a row in block 1 -- will wait on a TX/4 After ca, three seconds session 1 will report ORA-00060. In Oracle 9, you may get lucky with just two blocks of data and three concurrent sessions, but for consistency you need to have three blocks of data and rotate through the sessions updating one row in each block from each session in turn. Jonathan Lewis http://www.jlcomp.demon.co.uk Author of: Practical Oracle 8i: Building Efficient Databases Next Seminar - Australia - July/August http://www.jlcomp.demon.co.uk/seminar.html Host to The Co-Operative Oracle Users' FAQ http://www.jlcomp.demon.co.uk/faq/ind_faq.html |Walter K wrote: | |> Can someone post an example of how to trigger a |> deadlock (ORA-0060) due to ITL shortage? This is for |> informational/fact-finding purposes. |> |> I've created a test table with MAXTRANS=1 and can |> cause the enqueue waits between two sessions |> contending for the same block but I can't seem to |> cause a deadlock to occur. |> |> Thanks. |> -w |> -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Jonathan Lewis INET: [EMAIL PROTECTED] Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- 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).