dbTalk Databases Forums  

Disable all constraints and triggers in entire schema.

comp.databases.oracle.misc comp.databases.oracle.misc


Discuss Disable all constraints and triggers in entire schema. in the comp.databases.oracle.misc forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Sean Nakasone
 
Posts: n/a

Default Disable all constraints and triggers in entire schema. - 11-13-2007 , 06:17 PM






Is there a way to disable all contraints and triggers in all the tables in
a particular schema? Either through toad or sql.

Reply With Quote
  #2  
Old   
Ana C. Dent
 
Posts: n/a

Default Re: Disable all constraints and triggers in entire schema. - 11-13-2007 , 09:58 PM






Sean Nakasone <seannakasone (AT) yahoo (DOT) com> wrote in
news:Pine.WNT.4.64.0711131416001.984 (AT) ctfanxnfba (DOT) unjnvvnaryrpgevp.arg:

Quote:
Is there a way to disable all contraints and triggers in all the
tables in a particular schema? Either through toad or sql.

yes, write SQL to write SQL & issue th DISABLES


Reply With Quote
  #3  
Old   
array7@inbox.com
 
Posts: n/a

Default Re: Disable all constraints and triggers in entire schema. - 11-14-2007 , 06:26 PM



On Nov 13, 4:17 pm, Sean Nakasone <seannakas... (AT) yahoo (DOT) com> wrote:
Quote:
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;
/



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.