#1 23 Apr 2008 12:22

Registered: 23 Apr 2008
Posts: 1

constraints Issue

i've a primary key which is referred by 4-5 tables foreign key. since i want to truncate the table containing primary key i was not able to do so. but after suffixin CASCADE to the alter command i was able to disable.

when enabling i'm able to enable the primary key but the foreign keys were still in the disable state.
how do i enable them generically.
i don't want to enable manually.


#2 24 Apr 2008 21:09

Simon Sheppard
Super Administrator
Registered: 27 Aug 2005
Posts: 939

Re: constraints Issue

something like

select 'ALTER TRIGGER ' || trigger_name || ' ENABLE;' from user_triggers;

If you spool that into a text file you'll have the commands you need to re-enable everything.


Board footer

Powered by FluxBB