Re: Disabling referential integrity contraints for an entire schema?

From: Vikram Goel <vgoel_at_emi.net>
Date: 1995/12/01
Message-ID: <DIxK4p.n79_at_emi.net>#1/1


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;

Next run this spooled file and the constraints will be disabled. Reverse
the operation to enable them. You should spool the enable script before you export or run the disable script.

Hope this helps,

fred_at_fred.nids.com (Fred) wrote:

> I am looking for a quick way to disable all referential integrity contraints
>for an entire schema. I need to do this in order to use the Import facility.
>Can anybody help me?


  • Vikram Goel Email: vgoel_at_emi.net *
  • *
  • Sr. Oracle Consultant DBA *
  • Boca Raton, Florida *
  • *
  • Aerotek Inc *
  • Ft. Lauderdale, FL *
  • *
  • OPINIONS EXPRESSED ARE MY OWN, Not of my Employer or Clients. *
Received on Fri Dec 01 1995 - 00:00:00 CET

Original text of this message