Home » RDBMS Server » Server Administration » Rename table
Rename table [message #229549] Mon, 09 April 2007 02:09 Go to next message
gkrishn
Messages: 506
Registered: December 2005
Location: Putty a dark screen
Senior Member
Hi i renamed my table.now how to drop my index ?its giving erorr

ORA-02429: cannot drop index used for enforcement of unique/primary key
Re: Rename table [message #229552 is a reply to message #229549] Mon, 09 April 2007 02:12 Go to previous messageGo to next message
Mohammad Taj
Messages: 2412
Registered: September 2006
Location: Dubai, UAE
Senior Member

HI,

ORA-02429: cannot drop index used for enforcement of unique/primary key 

Cause: user attempted to drop an index that is being used as the enforcement mechanism for unique or primary key. 

Action: drop the constraint instead of the index. 


Re: Rename table [message #229555 is a reply to message #229549] Mon, 09 April 2007 02:14 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

And this has no relation with a rename.

Regards
Michel
Re: Rename table [message #229561 is a reply to message #229549] Mon, 09 April 2007 02:27 Go to previous messageGo to next message
gkrishn
Messages: 506
Registered: December 2005
Location: Putty a dark screen
Senior Member
its a unique index .cann't i just drop using DROP INDEX command ?
Re: Rename table [message #229563 is a reply to message #229549] Mon, 09 April 2007 02:30 Go to previous messageGo to next message
gkrishn
Messages: 506
Registered: December 2005
Location: Putty a dark screen
Senior Member
following are more details.

select index_name,table_name from dba_indexes where index_name='mytable_PK1';

INDEX_NAME TABLE_NAME
------------------------------ ------------------------------
mytable_PK1 mytable


select CONSTRAINT_NAME,CONSTRAINT_TYPE from dba_constraints
2 where TABLE_NAME='mytable';

CONSTRAINT_NAME C
------------------------------ -
SYS_C00264328 C
SYS_C00264329 C
SYS_C00264330 C
SYS_C00264335 C
SYS_C00264336 P
Re: Rename table [message #229567 is a reply to message #229563] Mon, 09 April 2007 02:37 Go to previous messageGo to next message
Mohammad Taj
Messages: 2412
Registered: September 2006
Location: Dubai, UAE
Senior Member

Hi,

SYS_C00264336 P


Drop this constraints and try your operation again.


Regards
Taj
icon8.gif  Re: Rename table [message #229568 is a reply to message #229549] Mon, 09 April 2007 02:39 Go to previous message
gkrishn
Messages: 506
Registered: December 2005
Location: Putty a dark screen
Senior Member
it worked.
some basiscs are missing from my brain Mad
Previous Topic: Datafiles in oracle 9
Next Topic: LogOn Problem
Goto Forum:
  


Current Time: Sat Dec 03 14:16:26 CST 2016

Total time taken to generate the page: 0.07225 seconds