An ora-00955 error occurred when adding a field to the primary key
Add an id2 field to mytable and make it one of the primary keys. The original primary key name is mytable_pk and the field is (id). follow these steps:
1. Delete the primary key:
Alter table mytable drop constraint mytable_pk cascade;
2. Add Fields
Alter table mytable add id2 varchar2 (6 );
3. Set initial values of new fields
Update mytable set id2 = 'sx ';
4. Change the new field to non-empty.
Alter table mytable modify id2 not null;
5. Add primary key constraints
Alter table mytable add constraint mytable_PK primary key (id2, id );
ERROR is located in row 1st:
ORA-00955: name used by existing object
Solution:
Because the original table may have an index of the same name, execute the following statement:
Drop index mytable_pk;
Run again
Alter table mytable add constraint mytable_PK primary key (id2, id );
ORA-01172, ORA-01151 error handling
ORA-00600 [2662] troubleshooting
Troubleshooting for ORA-01078 and LRM-00109
Notes on ORA-00471 Processing Methods
ORA-00314, redolog corruption, or missing Handling Methods
Solution to ORA-00257 archive logs being too large to store