Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Simultaneous INSERTs - one of them "hangs"

Re: Simultaneous INSERTs - one of them "hangs"

From: Francis Small <fthes_at_sr.hp.com>
Date: 1997/11/26
Message-ID: <65hm5v$7gm@canyon.sr.hp.com>#1/1

David Russell (user_at_msn.com) wrote:
: The best way to avoid this problem is to use Oracle Sequences so that no
: two sessions can generate the same primary key. If you can not rewrite for
: this and you are using OCI you can specify that any DML statement uses NO
: WAIT, but this flag is only available from OCI.

Although I am using sequences as primary keys, other combinations of fields must be unique. You have the same problem if two users attempt to insert two records with identical values for a unique constraint, even if their primary keys are the same.

I am using PL/SQL for may code. My understanding of OCI is

Our strategy is to use PL/SQL to generate as much of the application code in packages and store them in the database. I presume there is no way to follow this methodology using an OCI-developed program: it must be an operating system executable and can not be a database-resident program.

  Francis

--
. . . . . . . . . | 1 . . . . . . . . . 2 . . . . . . . . . 3 . . . . . . . . 
Giants                                         Francis Small - M/S M3RA     
    Bums                                         Hewlett-Packard Company
              Rockies                              Microwave Instruments Div.
                            Padres                   1212 Valley House Dr.
                                                       Rohnert Park CA, 94928
                                                         707 794 3305
                                                           fthes_at_sr.hp.com
***************** Final 1997 National League West Standings *****************
Received on Wed Nov 26 1997 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US