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

Home -> Community -> Usenet -> c.d.o.tools -> Re: disabling foreign keys

Re: disabling foreign keys

From: Rafal Jank <yankee_at_wp-sa.pl>
Date: Wed, 30 May 2001 15:08:06 +0200
Message-ID: <3B14F0B6.FCB5998F@wp-sa.pl>

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

Original text of this message

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