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: How to disable foreign key constraints in a stored procedure?

Re: How to disable foreign key constraints in a stored procedure?

From: Jeremy <jeremy0505_at_gmail.com>
Date: Fri, 17 Mar 2006 17:40:58 -0000
Message-ID: <MPG.1e8504fc9f9f0fe198a13d@news.individual.net>


In article <1142612664.419458.147650_at_p10g2000cwp.googlegroups.com>, fitzjarrell_at_cox.net says...
> Commens embedded.
> laredotornado_at_zipmail.com wrote:
> > Hi,
> >
> > Is there another way to do what I'm trying to do in Oracle 9i for
> > Solaris? In a stored procedure, I want to disable some foreign key
> > constraints, perform some actions, and then re-enable them.
>

<snip>

> > Your suggestions are apprecaited, - Dave

You would need to use "execute immediate" as has been suggested.

>
> My suggestion would be to re-think your 'reasoning' for disabling the
> foreign keys.

Suppose you want to bulk load data into database - the data is coming from a source where its integrity is guaranteed (because of the constaints there) and you want the quickest load time (perhaps this is a data migration exercise?) - is it not reasonable to want to temporarily disable constraints? Assuming that this is dedicated access for the duration?

-- 

jeremy
Received on Fri Mar 17 2006 - 11:40:58 CST

Original text of this message

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