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: When IMPORT: How to disable constraints ?

Re: When IMPORT: How to disable constraints ?

From: Rotter Richard <rotter_at_aon.at>
Date: Sun, 23 Jan 2000 11:58:01 +0100
Message-ID: <388ade4c$0$20904@SSP1NO17.highway.telekom.at>


hi Jannette!

I do this in sql+ with the following script:

spo disable.sql
select 'alter table '||table_name||' disable constraint '||constraint_name||';'
from all_constraints
where constraint_type = 'R';

Make in the same way an enable-script.

then:

 1.) start disable.sql
 2.) import your data
 3.) start enable.sql

Rotter Richard
Oracle DBA

Jannette <jannetteyiu_at_my-deja.com> schrieb in im Newsbeitrag: 86e51c$15h$1_at_nnrp1.deja.com...
> From Oracle documentation:
> "Suggestion: ... it is a good idea to disable referential constraints
> when importing into an existing table. You can then re-enable the
> constraints after the import is completed."
>
> How do you disable contraints on ALL tables in one shot ?
> Can you do this through one of Ent. Manager tools or you have to do it
> in SQL+ ?
>
> Thanks
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Received on Sun Jan 23 2000 - 04:58:01 CST

Original text of this message

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