Unused Classes by Repository Type

Lists all classes that are not used by the metadata elements in the repositories of the specified repository type.


Click on the text to copy the query report to your clipboard.


select "CLASS_NAME",
"ORIGINATOR_NAME",
"PACKAGE_NAME",
"CLASS_DESC",
"REPO_TYPE_NAME",
"PRODUCT_TYPE",
"MODIFIED_ON"
from (SELECT  MMR_IMA_CLASS.ORIGINATOR_NAME,  MMR_IMA_REPO_TYPE.PRODUCT_TYPE,  MMR_IMA_REPO_PACKAGE.REPO_TYPE_NAME,  MMR_IMA_CLASS.PACKAGE_NAME,  MMR_IMA_CLASS.CLASS_NAME,  MMR_IMA_CLASS.CLASS_DESC,  MMR_IMA_CLASS.DELETED_FLAG,  convert(varchar,MMR_IMA_CLASS.MODIFIED_ON,23) as MODIFIED_ON,  (COUNT(MMR_IMA_ELEMENT.ELEMENT_UID)) as ELEMENT_UID FROM  IMA_PACKAGE MMR_IMA_PACKAGE,  IMA_REPO_PACKAGE MMR_IMA_REPO_PACKAGE,  IMA_REPO_TYPE MMR_IMA_REPO_TYPE,  IMA_ELEMENT MMR_IMA_ELEMENT    RIGHT OUTER JOIN IMA_CLASS MMR_IMA_CLASS    ON MMR_IMA_ELEMENT.CLASS_ID = MMR_IMA_CLASS.CLASS_ID  WHERE  (MMR_IMA_CLASS.PACKAGE_UID = MMR_IMA_PACKAGE.PACKAGE_UID AND  MMR_IMA_REPO_PACKAGE.PACKAGE_UID = MMR_IMA_PACKAGE.PACKAGE_UID AND  MMR_IMA_REPO_PACKAGE.REPO_TYPE_UID = MMR_IMA_REPO_TYPE.REPO_TYPE_UID) AND  (MMR_IMA_CLASS.DELETED_FLAG IN ('N') )  GROUP BY  MMR_IMA_CLASS.ORIGINATOR_NAME,  MMR_IMA_REPO_TYPE.PRODUCT_TYPE,  MMR_IMA_REPO_PACKAGE.REPO_TYPE_NAME,  MMR_IMA_CLASS.PACKAGE_NAME,  MMR_IMA_CLASS.CLASS_NAME,  MMR_IMA_CLASS.CLASS_DESC,  MMR_IMA_CLASS.DELETED_FLAG,  MMR_IMA_CLASS.MODIFIED_ON  HAVING  (COUNT(MMR_IMA_ELEMENT.ELEMENT_UID)) = 0) "query"
where "PRODUCT_TYPE" in ('<Repository_Type_Product_Type>') and "REPO_TYPE_NAME" in ('<Repository_Type_Name>')
order by "ORIGINATOR_NAME", "PRODUCT_TYPE", "REPO_TYPE_NAME", "PACKAGE_NAME"

Leave a Comment

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>
*
*