the user guide says that The EM CLI verb set_target_property_value is the recommended way to set target properties in bulk across many different targets at a time. For more details on the EM CLI verbs, refer to the Oracle Enterprise Manager Command Line Interface documentation.
but the documentation does not give any examples on bulk modification of target properties. can ou tell me an example command to change target property values of several targets in bulk?
Here is the link (http://docs.oracle.com/cd/E24628_01/em.121/e17786/cli_verb_ref.htm#CACGJCFF) to user guide where this CLI verb is explained and it doesn't talk about setting target properties of multiple targets. Can you tell where you see such a document where this verb is said to set properties in bulk?
Edited by: Vishal_EM_assist on Nov 26, 2012 12:13 AM
There are several ways to do it. If you're using non-cluster targets you set the property at parent level and use the -propagate_to_members option.
e.g. emcli set_target_property_value -property_records="orcl_sys:oracle_dbsysys:LifeCycleStatus:Production" -propagate_to_members
This would apply set the LifeCycleStatus property for the oracle database system aggregate target consisting of database instance, ASM listener listener to Production.
For non-aggregate targets you can specify multiple targets on the command line or using a REC file.
e.g. emcli set_target_property_value -property_records="REC_FILE" -input_file="REC_FILE:/opt/oracle/rec_file"
The property has to be valid for the target. Use emcli get_target_properties -target_type="<target_type>" to check the valid properties.
It should also be possible to script doing this en masse by using the output of emcli get_targets and applying some formatting. You could then parse the output as the input to the REC_FILE. I'm sure there are other ways to get it done.
BTW - The documentation lists the examples of setting properties for multiple targets