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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Disabling Constraints

Re: Disabling Constraints

From: Ruth Gramolini <rgramolini_at_tax.state.vt.us>
Date: Tue, 27 Nov 2001 05:12:29 -0800
Message-ID: <F001.003CD8C2.20011127050027@fatcity.com>

Here is a script which generates all of the 'alter table' statements to drop the referential constrains. Spool if or cut and paste and you should be all set.

select 'alter table schema.'||table_name||' disable constraint '||constraint_name||';'
from dba_constraints
where CONSTRAINT_TYPE in ('R')
and owner='SCHEMA';

HTH,
Ruth

> I need to disable some constraints to load table data for my DB
conversion.
> I cannot find the syntax to do this. I think it should be ALTER TABLE
> something.
>
> Thanks,
>
> Ken Janusz, CPIM
> Database Conversion Lead
> Sufficient System, Inc.
> Minneapolis, MN
>
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> --
> Author: Ken Janusz
> INET: ken.janusz_at_sufsys.com
>
> Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
> San Diego, California -- Public Internet access / Mailing Lists
> --------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from). You may
> also send the HELP command for other information (like subscribing).

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Ruth Gramolini
  INET: rgramolini_at_tax.state.vt.us

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Tue Nov 27 2001 - 07:12:29 CST

Original text of this message

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