Re: Wait event SQL*Net break/reset to client caused by duplicate insert?
Date: Thu, 10 Apr 2008 04:45:54 -0700 (PDT)
- On Thu, 4/10/08, Peter Hitchman <pjhoraclel_at_gmail.com> wrote:
> From: Peter Hitchman <pjhoraclel_at_gmail.com>
> suggested a change to first update and then insert if no
> row is updated. I
> also considered using merge, but I thought that it might
> not be supported by
> the jdbc driver and time pressure means we do not have the
> time to find out.
If you don't want to try MERGE, you could always make an anonymous PL/SQL block (which is certainly supported by PL/SQL) and so handle the insert-else-update (or update-else-insert - whichever is the best tradeoff) in one SQL round trip from application server to database; then there will never need to be an exception raised to (and handled by) JDBC.
Cheers NigelReceived on Thu Apr 10 2008 - 06:45:54 CDT