Skip to Main Content

Enterprise Manager

Announcement

For appeals, questions and feedback, please email oracle-forums_moderators_us@oracle.com

emcli list_targets_having_property_value reads wrong column from Repository

User_IPPNHOct 19 2023

Hello all,

I want to change from all target with a specific value to a new value.

I successfully wrote the output of the command in a textfile with:
emcli list_targets_having_property_value -property_name="Location" -property_value="Location1" > $Property_txt

At a first look into Property_txt it seems everything OK (real names are changed):
List of targets using value "Nürnberg" for property "Location"
ORA-MDS-local-cache_ADFShareRuntime_xxxx oracle_coherence_cache
SB_JMS_Proxy_yyyyyy j2ee_application_cluster
OABMetadata j2ee_application_cluster
domainhealth-123 j2ee_application
opss-rest j2ee_application
CCA-GUI j2ee_application
CCA-GUI j2ee_application
CCA-GUI j2ee_application_cluster
CCA-GUI j2ee_application_domain

But as I run my script:
while IFS=$'\t' read col1 col2 || [ -n "$col1" ]
do
trgt=$col1
trgt_typ=$col2

   echo $trgt\_typ $'\\t'  $trgt  
   emcli set\_target\_property\_value -subseparator=property\_records=","  -property\_records="$trgt,$trgt\_typ,Location,NewLocation"  

done < $Property_txt

Everything worked fine for agents and hosts. But for applications (see above) I got evertime an Error:
Error: Invalid target in record: ORA-MDS-local-cache_ADFShareRuntime_xxxx,oracle_coherence_cache,Location
j2ee_application_cluster SB_JMS_Proxy_yyyyyy
Error: Invalid target in record: SB_JMS_Proxy_yyyyyy,j2ee_application_cluster,Location
oracle_emd host097.domain:3872
Properties updated successfully
oracle_emd host096.domain:3872
Properties updated successfully
host host097.domain
Properties updated successfully
host host096.domain
Properties updated successfully
j2ee_application_cluster OABMetadata
Error: Invalid target in record: OABMetadata,j2ee_application_cluster,Location
j2ee_application domainhealth-123
Error: Invalid target in record: domainhealth-123,j2ee_application,Location
j2ee_application opss-rest
Error: Invalid target in record: opss-rest,j2ee_application,Location
j2ee_application CCA-GUI
Error: Invalid target in record: CCA-GUI,j2ee_application,Location
j2ee_application CCA-GUI
Error: Invalid target in record: CCA-GUI,j2ee_application,Location
j2ee_application_cluster CCA-GUI
Error: Invalid target in record: CCA-GUI,j2ee_application_cluster,Location
j2ee_application_domain CCA-GUI
Error: Invalid target in record: CCA-GUI,j2ee_application_domain,Location

I noticed an issue by comparing in EM Console or EMCC. I noticed that emcli list_targets_having_property_value reads the Column “Display Name” from the Repository instead of Target Name. Therefore I think all FMW regarding targets can not be changed.

Can someone help me out here with another solution, please?

with best regards

Comments
Post Details
Added on Oct 19 2023
0 comments
87 views