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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Disable all constraints and triggers in entire schema.

Re: Disable all constraints and triggers in entire schema.

From: <array7_at_inbox.com>
Date: Wed, 14 Nov 2007 16:26:20 -0800
Message-ID: <1195086380.874230.104500@y27g2000pre.googlegroups.com>


On Nov 13, 4:17 pm, Sean Nakasone <seannakas..._at_yahoo.com> wrote:
> Is there a way to disable all contraints and triggers in all the tables in
> a particular schema? Either through toad or sql.

begin
  for rec in (select * from user_constraints) loop     execute immediate 'alter table ' || rec.table_name || ' disable constraint ' || rec.constraint_name;
  end loop;
end;
/ Received on Wed Nov 14 2007 - 18:26:20 CST

Original text of this message

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