Disabled subclasses from database
The below query will return any subclass for Parts that is disabled :
select id,description from nodetable n where parentid=10004 and exists (select null from propertytable where parentid=n.id and propertyid=40 and value=’0′);
You can change NODETABLE.PARENTID to 9004 to check for disabled Document subclasses. In most cases, the ID of the User Defined Subclass node for a class is the base ID plus 4, but double-check that rather than assume that it is true for everything.