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: Constraint Enable/Disable

RE: Constraint Enable/Disable

From: Sujatha Madan <sujatha.madan_at_cmc.cwo.net.au>
Date: Thu, 01 Nov 2001 20:48:53 -0800
Message-ID: <F001.003BB10F.20011101205019@fatcity.com>

I am trying to import data into a database, but it keeps skipping rows because of constraints. So I want to disable the constraints, import the data and then enable the constraints again.

Can I do this? or is there another way to go about it?

Thanks

-----Original Message-----
Sent: Friday, 2 November 2001 3:30 PM
To: Multiple recipients of list ORACLE-L

Namaskar !!

alter table table_name disable constraint cons_name; you could generate sql's to generate these ..

select 'alter table '||table_name||' disable constraint '||constraint_name||';'
from all_constraints
where constraint_type in ('C','R')
/

later you could replace the DISABLE with ENABLE and.... ..

regards

> ----------
> From: Sujatha Madan[SMTP:sujatha.madan_at_cmc.cwo.net.au ]
> Reply To: ORACLE-L_at_fatcity.com
> Sent: Friday, November 02, 2001 11:15 AM
> To: Multiple recipients of list ORACLE-L
> Subject: Constraint Enable/Disable
>
> Hi,
> Is there a way to disable all constraints, and then enable them all again?
> Thanx
> Sujatha
>

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Rahul
  INET: rahul_at_ratelindo.co.id

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: Sujatha Madan
  INET: sujatha.madan_at_cmc.cwo.net.au

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 Thu Nov 01 2001 - 22:48:53 CST

Original text of this message

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