Wednesday, February 8, 2012 15:05

delete a custom filetype using sql

Tagged with:
Posted by on Tuesday, December 1, 2009, 16:03
This news item was posted in Documentum category and has 1 Comment so far.

The normal way to delete a custom file type is(dql):

delete <type_name>(all) object;

drop type <type_name>;

if  when excuting the above statement,an error which says”Attempt to remove type<type_name> , which still has objects”,you can excute this statement to get all the hidden objects: select * from <type name> (all) where i_is_deleted=1 or a_is_hidden=1

The following is the last way to delete a custom file type.(sql)

delete from dm_sysobject_r where r_object_id in (select r_object_id from dm_sysobject_s where r_object_type=’<type name>’);
delete from dm_type_r where r_object_id in (select r_object_id from dm_type_s where name=’<type name>’);
delete from dmi_dd_common_info_r where r_object_id in (select r_object_id from dmi_dd_common_info_s where type_name = ‘<type name>’);
delete from dmi_object_type where r_object_id in (select r_object_id from dm_sysobject_s where r_object_type=’<type name>’);
delete from dmi_type_info_r where r_object_id in (select r_object_id from dmi_type_info_s where r_type_name=’<type name>’);

delete from dmi_type_info_s where r_type_name=’<type name>’;
delete from dmi_dd_common_info_s where type_name = ‘<type name>’;
delete from dm_type_s where name=’<type name>’;
delete from dm_sysobject_s where r_object_type=’<type name>’;

drop table <type name>_r;

drop table <type name>_s;

BTW,as a plus: turn API trace on: apply,c,NULL,SQL_TRACE,LEVEL,I,1

1 Response to “delete a custom filetype using sql”

  1. 7 December, 2009, 14:53

    Murphy, this is pretty cool!

Leave a Reply

You can leave a response, or trackback from your own site.