On 5/8/06, Jared Still <jkstill@(protected)> wrote: > > On 5/8/06, Alessandro Vercelli <alever@(protected)> wrote: > > > 1. Is it correct an insert/update without a commit into a sql package? > > If yes, when are the inserted/updated data commited? > > > That really depends on the app. > > eg. A stored procedure is used to update the data, the user has to push a > button to do the commit, or another button to abandon the transaction and > rollback. > > Possible problems with that approach is that the user may start the > transaction > and then go to lunch, leave N row locked. > > This however does not cause a deadlock, just blocking, which is not really > the same thing. > > An ORA-4020 (See ORA-4020.ora-code.com) occurs when 2 sessions each hold a resource that the other > session wants to lock. Oracle breaks the tie. > > 2. Would this the possible cause of the deadclock, as the table indexes > > could be locked by a large number of records inserted/updated? > > > You should probably look on MetaLink for documents related to ORA-4020 (See ORA-4020.ora-code.com). > It has been written about exhaustively, and well documented. > Search on asktom as well. > > ORA-4020 (See ORA-4020.ora-code.com) is caused by inconsistently written SQL. > Rather than try to explain it, it would be best if you > just read what is already written about it. > > > 3. Is this the correct way to get the choice of performing a rollback? > > > That really depends on the app requirements. > > > -- > Jared Still > Certifiable Oracle DBA and Part Time Perl Evangelist >
-- Jared Still Certifiable Oracle DBA and Part Time Perl Evangelist
That should teach me to check the error message before replying.<br><br>I can never keep straight which is which.<br><br>(ORA-60 (See ORA-60.ora-code.com) vs. ORA-4020 (See ORA-4020.ora-code.com))<br><br>It's an ORA-60 (See ORA-60.ora-code.com), as Mark has stated.<br><br>Different error number, same advice. <br><br><div><span class="gmail_quote">On 5/8/06, <b class="gmail_sendername" >Jared Still</b> <<a href="mailto:jkstill@(protected)">jkstill@(protected)</a>> ; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb (204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> <div style="direction: ltr;"><span class="q">On 5/8/06, <b class="gmail _sendername">Alessandro Vercelli</b> <<a href="mailto:alever@(protected)" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">alever @(protected) </a>> wrote:</span></div><div style="direction: ltr;"><div></div><div style= "direction: ltr;"><span class="q"><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
1. Is it correct an insert/update without a commit into a sql package? If yes, when are the inserted/updated data commited?</blockquote></span></div><div style="direction: ltr;"><div><br>That really depends on the app.<br> <br>eg. A stored procedure is used to update the data, the user has to push a <br>button to do the commit, or another button to abandon the transaction and rollback.<br><br>Possible problems with that approach is that the user may start the transaction<br>and then go to lunch, leave N row locked.<br>
<br>This however does not cause a deadlock, just blocking, which is not really the same thing.<br><br>An ORA-4020 (See ORA-4020.ora-code.com) occurs when 2 sessions each hold a resource that the other<br>session wants to lock. Oracle breaks the tie. <br><br></div></div><div style="direction: ltr;"><span class="q"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">2. Would this the possible cause of the deadclock, as the table indexes could be locked by a large number of records inserted/updated? </blockquote></span></div><div style="direction: ltr;"><div><br>You should probably look on MetaLink for documents related to ORA-4020 (See ORA-4020.ora-code.com). <br>It has been written about exhaustively, and well documented.<br>Search on asktom as well. <br><br>ORA-4020 (See ORA-4020.ora-code.com) is caused by inconsistently written SQL. <br>Rather than try to explain it, it would be best if you <br>just read what is already written about it.<br><br></div></div><div style="direction: ltr;"> <span class="q"><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
3. Is this the correct way to get the choice of performing a rollback?< /blockquote></span></div><div style="direction: ltr;"><div><br>That really depends on the app requirements.<br><br></div></div><br>-- <br>Jared Still <br>Certifiable Oracle DBA and Part Time Perl Evangelist <br>
</div></blockquote></div><br><br clear="all"><br>-- <br>Jared Still<br >Certifiable Oracle DBA and Part Time Perl Evangelist<br>