views:

144

answers:

1

I'm trying to add an attribute to an already existing Object Type in an Oracle 10.2.0.4 DB. The schema is valid, and everything is working before running the following statement:

ALTER TYPE sometype ADD ATTRIBUTE (somefield varchar(14))
CASCADE INCLUDING TABLE DATA
/
SHOW ERRORS

The alter fails with an ORA-22324 and an ORA-21700. Afterwards most of the schema objects which depend on sometype are invalid. Compiling them all, restores the schema to a working state.

Anyone seen that kind of error?

+1  A: 

ORA-22324 is "Altered type has compilation errors", and ORA-21700 is "Object does not exist or is marked for delete". Sounds like the body of your type may be referencing something which has been deleted.

I hope this helps.

Bob Jarvis
Thanks for your answer. I had the same idea, but everything seems to be working. So I thougt, the type should be OK.I now replaced the body of the type, hoping this would change something, but it had no effect. I still get the same errors when I try to add the attribute.
Jerome