Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Re: disabling foreign keys
Peter Morris wrote:
>
> I want to write a script that disables all foreign keys at once.
> I have tried the following
>
> update
> user_constraints
> set
> status = 'DISABLED'
> where
> constraint_name like 'ITX%FK_' ;
>
> (all foreign key names follow a regular pattern)
> This produces an error message : insufficient privileges.
>
> I think the problem is that I have insufficient priveliges set
> to do this. Our sysadmin says that it can't be done at all.
> Is he right? If so, is there any other way of doing it?
Your sysadmin is right. You have to do alter table table_name disable costraint
constraint_name.
Rafal
-- _/ _/ _/_/_/ ----- Rafa³ Jank yankee_at_wp.pl ----- _/ _/ _/ _/ _/ Wirtualna Polska SA http://www.wp.pl _/_/_/_/ _/_/_/ ul. Uphagena 2, 80-237 Gdansk, tel/fax. (58) 5215625 _/ _/ _/ --------==* http://szukaj.wp.pl *==----------Received on Wed May 30 2001 - 08:08:06 CDT