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: Oracle 8.16 Deadlock

Re: Oracle 8.16 Deadlock

From: <n.a.ekern_at_usit.uio.no>
Date: 11 Jan 2002 15:58:45 GMT
Message-ID: <a1n23l$mej$1@readme.uio.no>


Hi!

I always issue a commit right before any ddl, since issuing a ddl is forcing a commit anyway.
That has solved similar problems for me.

But, is this a routine that disables the foreign key, manipulate some data and then enables the foreign key?
If that's so you will be far better off doing something like this:

Drop the foreign key and recreate it as 'deferrable initially immediate' Now your routine no longer have to issue the ddl, do it like this, f ex using dbms_sql:

set constraint PDGI_ISA_SPECIALTY_FK_CTRY_FK deferred; do_the_other_stuff
set constraint PDGI_ISA_SPECIALTY_FK_CTRY_FK immediate;

A bonus is that you no longer have to block other users' access to the T49PDGI"."PDGI_ISA_SPECIALTY table, because this is pure dml. That is, unless you do other diabling of foreign keys.

Regards,
Njål Ekern
naekern_at_hotmail.com
n.a.ekern_at_usit.uio.no

--
<plasner_at_de.imshealth.com>:
It's just a simple table. The problem happens when the program (PL/SQL,
using the dbms_sql package) tries to do :
ALTER TABLE "T49PDGI"."PDGI_ISA_SPECIALTY" DISABLE CONSTRAINT
"PDGI_ISA_SPECIALTY_FK_CTRY_FK"
The constraint is defined as  FOREIGN KEY (SPEC_CTRY_ID)  REFERENCES
T49PDGI.PDGI_COUNTRIES (CTRY_ID) ;
By the way sometimes the program executes successfully.
Regards Peter
Received on Fri Jan 11 2002 - 09:58:45 CST

Original text of this message

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