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

Home -> Community -> Usenet -> c.d.o.server -> Cannot drop SYS_ constraints - Why?

Cannot drop SYS_ constraints - Why?

From: Simon Goland <sg_at_mda.ca>
Date: 1997/06/05
Message-ID: <3397366C.6BF1@mda.ca>#1/1

For some reason (I guess multiple imports...) we now have many duplicate SYS_ constraints on many columns. So I wrote a combination of SQL/perl scripts to remove all duplicate SYS_ constraints for all columns in all tables. However, for some reason, these cannot be dropped (ORA-02443).

Running the query for a specific user

SELECT constraint_name,constraint_type,table_name   FROM all_constraints
 WHERE table_name = 'PRODUCT'
   AND constraint_name like 'SYS%';

gives me something like

CONSTRAINT_NAME                C TABLE_NAME
------------------------------ - ------------------------------
SYS_C0044054                   C PRODUCT
SYS_C0044055                   C PRODUCT
SYS_C0044056                   C PRODUCT

(more output deleted... )
(all constraints are ENABLED)

And when I run the command (as the very same user)

alter table PRODUCT drop constraint SYS_C0044056;

I keep getting:

alter table product drop constraint SYS_C0044056

                                    *

ERROR at line 1:
ORA-02443: Cannot drop constraint - nonexistent constraint

What am I missing here?

Thanks,

-- 
[ Simon Goland       B-)>     sg_at_mda.ca ]
[   Without action there is no change   ]
Received on Thu Jun 05 1997 - 00:00:00 CDT

Original text of this message

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