Error, OEM 12c

OEM 12c set_target_property_value error

I ran across this error today while testing a script for OEM 12c emcli.

Error: The command name “set_target_property_value” is not a recognized command.
Run the “help” command for a list of recognized commands.
You may also need to run the “sync” command to synchronize with the current OMS.

Everything looked correct, I even copied and pasted the from the documentation (insert joke about documentation here), but no avail. I then took the advice of the error message and ran the “help” command.

[oracle@kappa bin]$ ./emcli help
Summary of commands:

argfile -- Execute emcli verbs from a file
 help -- Get help for emcli verbs (Usage: emcli help [verb_name])
 invoke_ws -- Invoke EM web service.
 login -- Login to the EM Management Server (OMS)
 logout -- Logout from the EM Management Server
 setup -- Setup emcli to work with an EM Management Server
 status -- List emcli configuration details
 sync -- Synchronize with the EM Management Server
 version -- List emcli verb versions or the emcli client version


[oracle@kappa bin]$ ./emcli help set_target_property_value
No help available for "em:set_target_property_value"

As you can see, that was no help. On a whim, I decided to try the next suggestion and run the “sync” command.

[oracle@kappa bin]$ ./emcli sync
Error: Session expired. Run emcli login to establish a session.

Interesting … Session expired. Okay let’s login.

[oracle@kappa bin]$ ./emcli login -username=sysman
Enter password

Login successful

Now lets try that help command again!
[oracle@kappa bin]$ ./emcli help set_target_property_value
 emcli set_target_property_value
 -property_records="target_name:target_type:property_name:property_value"
 [-separator=property_records="sep_string"]
 [-subseparator=property_records="subsep_string"]
 [-input_file="parameter_tag:file_path"]
 [-propagate_to_members]

Description:
 Sets the value of a target property for a specified target.
 Any prior values of the target property are overwritten.
 When assigning values to the Oracle-provided target properties, use
 the English names of these target properties: Comment,
 Line of Business, Location, Contact, Department.

Options:
 -property_records
 List of property records. Each property record is composed of following 4 parts:
 <target_name>:<target_type>:<property_name>:property_value>
 Where <target_name> is the target_name of the target for which the property needs to be updated.
 <target_type> is the target_type of the target.
 <property_name> is the name of the property whose value needs to be updated.
 Property names are case sensitive.
 <property_value> is the value to be assigned/updated for the property.
 -separator=property_records="sep_string"
 When specifying multiple property records, the separator string delimiter
 would be used as a delimiter between property records.
 The default separator delimiter is ";".
 -subseparator=property_records="subsep_string"
 String delimiter to be used between parts of a property record.
 The default subseparator delimiter is ":".
 -input_file
 Used in conjunction with the "-property_records" option, this option
 allows the user to provide the property records in a file.
 The "-input_file" option
 specifies a mapping between a tag and a local file path. The tag
 is specified in lieu of property records
 The tag must not contain colons (:)or semi-colons (;)
 -propagate_to_members
 Can be used for Group and System targets, to propagate to the property to all its members also.

Examples:
 emcli set_target_property_value
 -property_records="test_database:oracle_database:Owner Name:Jane Smith"
 For the database 'test_database', sets the 'Owner Name' property to Jane Smith.

emcli set_target_property_value
 -property_records="test_db:oracle_database:Owner:Jane Smith;test_db1:oracle_database:Asset Number:100"
 For the database 'test_db', sets the Owner property to Jane Smith.
 For the database 'test_db1', sets the Asset Number property to 100.

emcli set_target_property_value
 -property_records="REC_FILE" -input_file="REC_FILE:/temp/rec_file"
 Takes the input of the property records from the specified file i.e /temp/rec_file.
 The file /temp/rec_file would contain entries as :
 test_db:oracle_database:Owner:Jane Smith;test_db1:oracle_database:Asset Number:100
 For the database 'test_db', sets the Owner property to Jane Smith.
 For the database 'test_db1', sets the Asset Number property to 100.

emcli set_target_property_value
 -property_records="test_db@oracle_database@Owner@Jane Smith,test_db1@oracle_database@Asset Number@100"
 -separator=property_records="," -subseparator=property_records="@"
 For the database 'test_db', sets the Owner property to Jane Smith.
 For the database 'test_db1', sets the Asset Number property to 100.
 The separator used within the records is "," and subseparator is "@" .

Well, what do you know? Now I am sure it tells us to login somewhere, and I just missed it. So if you are like me, hopefully this will get you over the hurdle 🙂

Now I’m getting “Error: Invalid target type in record:”

… but I can deal with that issue.

EnjoydbaOnTap

Related Posts Plugin for WordPress, Blogger...

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.