Is it possible to extract ‘LifeCycle Status’ using emcli ( Oracle Enterprise Manager )

oracleoracle-enterprise-manager

It's easy to set the LifeCycle status ( and other properties ) with emcli,

emcli set_target_property_value -property_records="sometestdatabase:rac_database:LifeCycle Status:Test"

but getting the current values isn't clear – I'm not seeing a verb in the reference.

Is the only way via SQL against the repository?

Thanks
Simon

Best Answer

It seems that it's not possible, but, for the record, here's to get get the information via SQL.

SELECT CASE INSTR ( cm_target_name, '_' )
WHEN 0 THEN cm_target_name
    ELSE SUBSTR ( cm_target_name, 0, INSTR ( cm_target_name, '_') - 1 )
END database_name, property_value
FROM sysman.cm$em_tprops_ecm_view
WHERE cm_target_type = 'oracle_database'
AND property_name = 'orcl_gtp_lifecycle_status';