Re: Disabling referential integrity contraints for an entire schema?
From: Chuck Hamilton <chuckh_at_ix.netcom.com>
Date: 1995/12/05
Message-ID: <4a1qkm$iki_at_cloner2.ix.netcom.com>#1/1
Date: 1995/12/05
Message-ID: <4a1qkm$iki_at_cloner2.ix.netcom.com>#1/1
vgoel_at_emi.net (Vikram Goel) wrote:
>Fred,
>You need to logon as the schema owner, then run the following select
>statement, NOTE: you should spool the output to a disk file:
>set verify off head off feedback off pagesize 0
>spool disable_cons.sql
>SELECT 'alter table '||table_name||' disable constraint
>'||constraint_name||' ;' from user_constraints;
I think you want to limit that to only 'R' type constraints. Otherwise you'll disable ALL constraints.
SELECT 'alter table '||table_name||' disable constraint '||constraint_name||' ;' from user_constraints where constraint_type = 'R';
-- Chuck Hamilton chuckh_at_ix.netcom.com Never share a foxhole with anyone braver than yourself!Received on Tue Dec 05 1995 - 00:00:00 CET