OEM

 SELECT 

  h.target_name,

  tp.property_name,

  tp.property_value,

  cd.support_group,

  cd.install_status,

  cd.oracle_home,

  cd.u_cmdb_ci_used_for,

  cd.u_cmdb_owner_group,

  cd.name,

  cd.correlation_id,

  cd.version


FROM 

  sysman.mgmt$target h

  LEFT JOIN mgmt$target_properties tp 

    ON h.target_name = tp.target_name

    AND tp.property_name IN ('udtp_2', 'orcl_gtp_contact', 'orcl_gtp_lifecycle_status') -- Filtering relevant properties

  LEFT JOIN SSC_OEM_ONBOARDING_ADMIN.CMDB_DB_CI_DAILY cd 

    ON h.target_name = cd.name


WHERE 

  (tp.property_value IS NULL OR tp.property_name IS NULL) -- Null properties

  OR (tp.property_name = 'orcl_gtp_contact' AND tp.property_value != cd.support_group) -- Support group mismatch

  OR (tp.property_name = 'orcl_gtp_lifecycle_status' AND tp.property_value != cd.install_status) -- Install status mismatch

  OR (tp.property_name = 'udtp_2' AND tp.property_value IS NULL) -- Null hosting value

  OR cd.oracle_home IS NULL; -- Missing Oracle home

Comments

Popular posts from this blog

SQL Loader V3

Db Unix

Standby redo log add