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 -> Disabling Existing Constraints and Index dropped

Disabling Existing Constraints and Index dropped

From: phil <phil_sheu_at_amax.com>
Date: Mon, 05 Aug 2002 18:09:09 GMT
Message-ID: <9bz39.17$w87.3263551@newssvr13.news.prodigy.com>


Hi,

If I disable an existing constraints (primary key), it seems the index would be dropped too.
How about I enable the primary key constraints again, will it create the index or I have to create the index by myself?

Thanks for your help.

Phil

Examples:
SQL> DROP INDEX SCOTT.PK_EMP;
 DROP INDEX SCOTT.PK_EMP
*

ERROR at line 1:
ORA-02429: cannot drop index used for enforcement of unique/primary key

SQL> ALTER TABLE SCOTT.EMP DISABLE PRIMARY KEY; Table altered.

SQL> DROP INDEX SCOTT.PK_EMP;
 DROP INDEX SCOTT.PK_EMP
*

ERROR at line 1:
ORA-01418: specified index does not exist

SQL> ALTER TABLE SCOTT.EMP ENABLE PRIMARY KEY; Table altered.

SQL> Received on Mon Aug 05 2002 - 13:09:09 CDT

Original text of this message

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