Our Oracle database oracle_home and instance_name have massive change and the targets need to be removed, I can remove the host but the EM admin said he has group rule setup and do not want to delete host, so I have to delete the target one-by-one, clicking in EM console is no fun, I logon to the EM repository database and run this query to generate the script to run on EM weblogic server.
select 'emcli delete_target -name='||TARGET_NAME||' -type="'||TARGET_TYPE||'"' from sysman.mgmt_targets where upper(host_name) like 'HOSTNAME%' and target_type like 'rac_database';
It generate command like below:
$emcli delete_target -name=blablabla -type="rac_database"
I need to run the emcli login first before run delete target...
emcli login -username=sysman -password=thepassword
select 'emcli delete_target -name='||TARGET_NAME||' -type="'||TARGET_TYPE||'"' from sysman.mgmt_targets where upper(host_name) like 'HOSTNAME%' and target_type like 'rac_database';
It generate command like below:
$emcli delete_target -name=blablabla -type="rac_database"
I need to run the emcli login first before run delete target...
emcli login -username=sysman -password=thepassword
Comments
Post a Comment