If you want to use emcli and setup the target from command line then do the below:
Log in to OMS server in my case it is unix box and the go to OMS home and bin directory and in my case it is
/u01/app/oracle/product/oem12c/middleware1/oms/bin
then log in using sysman and do a sync
$ ./emcli login -username=sysman
Enter password :
Login successful
$ ./emcli sync
Synchronized successfully
$
after sync issue the command below to add each instance and then add it to the cluster.
$ ./emcli add_target -name=db2datp1 -type=oracle_database -host="host1" -credentials="UserName:dbsnmp;password:*********;Role:Normal" -properties="SID:db2datp1;Port:1521;OracleHome:/u01/app/oracle/product/12.1.0.2;MachineName:host1.example.com"
$ ./emcli add_target -name=db2datp2 -type=oracle_database -host="host2" -credentials="UserName:dbsnmp;password:*********;Role:Normal" -properties="SID:db2datp2;Port:1521;OracleHome:/u01/app/oracle/product/12.1.0.2;MachineName:host2.example.com"
$ ./emcli add_target -name="db2datp.example.com" -type="rac_database" -host="host1" -monitor_mode="1" -properties="ServiceName:db2dat_ha;ClusterName:rachost1" -instances="db2datp1:oracle_database;db2datp2:oracle_database"
Log in to OMS server in my case it is unix box and the go to OMS home and bin directory and in my case it is
/u01/app/oracle/product/oem12c/middleware1/oms/bin
then log in using sysman and do a sync
$ ./emcli login -username=sysman
Enter password :
Login successful
$ ./emcli sync
Synchronized successfully
$
after sync issue the command below to add each instance and then add it to the cluster.
$ ./emcli add_target -name=db2datp1 -type=oracle_database -host="host1" -credentials="UserName:dbsnmp;password:*********;Role:Normal" -properties="SID:db2datp1;Port:1521;OracleHome:/u01/app/oracle/product/12.1.0.2;MachineName:host1.example.com"
$ ./emcli add_target -name=db2datp2 -type=oracle_database -host="host2" -credentials="UserName:dbsnmp;password:*********;Role:Normal" -properties="SID:db2datp2;Port:1521;OracleHome:/u01/app/oracle/product/12.1.0.2;MachineName:host2.example.com"
$ ./emcli add_target -name="db2datp.example.com" -type="rac_database" -host="host1" -monitor_mode="1" -properties="ServiceName:db2dat_ha;ClusterName:rachost1" -instances="db2datp1:oracle_database;db2datp2:oracle_database"
No comments:
Post a Comment