Home » SQL & PL/SQL » SQL & PL/SQL » Drop object type that is marked for delete
Drop object type that is marked for delete [message #219599] Thu, 15 February 2007 01:50 Go to next message
rolex.mp
Messages: 161
Registered: February 2007
Senior Member
I tried deleting a object type it gave me this error

drop type ad_type1;
drop type ad_type1
*
ERROR at line 1:
ORA-21700: object does not exist or is marked for delete

I queried user_objects it gave me the following result

select object_type,status from user_objects where object_name='AD_TYPE1';

OBJECT_TYPE STATUS
------------------- -------
TYPE VALID
TYPE BODY INVALID

How can I drop a object that is marked for delete?
Re: Drop object type that is marked for delete [message #219621 is a reply to message #219599] Thu, 15 February 2007 03:38 Go to previous messageGo to next message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
You could try DROP TYPE <typename> FORCE, if there are no objects dependent on that type.
Re: Drop object type that is marked for delete [message #219651 is a reply to message #219599] Thu, 15 February 2007 05:06 Go to previous messageGo to next message
rolex.mp
Messages: 161
Registered: February 2007
Senior Member
I tried it but got the same error

SQL> drop type ad_type1 force;
drop type ad_type1 force
*
ERROR at line 1:
ORA-21700: object does not exist or is marked for delete


SQL> drop type ad_type1 validate;
drop type ad_type1 validate
*
ERROR at line 1:
ORA-21700: object does not exist or is marked for delete
Re: Drop object type that is marked for delete [message #219666 is a reply to message #219651] Thu, 15 February 2007 06:39 Go to previous messageGo to next message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
Have you tried doing a CREATE OR REPLACE on it to see if you can recreate it as a valid object?
Re: Drop object type that is marked for delete [message #219671 is a reply to message #219666] Thu, 15 February 2007 06:56 Go to previous message
tahpush
Messages: 961
Registered: August 2006
Location: Stockholm/Sweden
Senior Member

Which Oracle version are you on ?

Also is this a column based on an object type involved?

[Updated on: Thu, 15 February 2007 07:10]

Report message to a moderator

Previous Topic: 3 questions
Next Topic: Sys ref cursor in for loop
Goto Forum:
  


Current Time: Tue Dec 06 04:47:20 CST 2016

Total time taken to generate the page: 0.06277 seconds