Archive for the ‘Grid Control’ Category

Got the following error when trying to add a target on 12c Grid Control

TEST: ORA-20500: TEST:oracle_database:testprd:https://testprd:3872/emd/main/:3:0 ORA-06512: at "SYSMAN.EM_TARGET", line 3347 ORA-06512: at line 1 - ORA-20500: TEST:oracle_database:testprd:https://testprd:3872/emd/main/:3:0 ORA-06512: at "SYSMAN.EM_TARGET", line 3347 ORA-06512: at line 1

To fix this we just need to remove the entry from the repository, so connect to the repository database as sysman and run the following

exec mgmt_admin.delete_target(‘TEST’,'oracle_database’);

It may take a few mins to delete but you can check by either looking in the health overview window in grid control – setup > manage cloud control > health overview and click on the value next to deleted targets this will list when the target was deleted.

You can also check by running the following sql against the repository database as sysman

set linesize 180
column TARGET_NAME format a30
column TARGET_TYPE format a15
column DISPLAY_NAME format a30
column HOST_NAME format a30
column EMD_URL format a45
select TARGET_NAME, TARGET_TYPE, DISPLAY_NAME, HOST_NAME, EMD_URL from mgmt_targets where target_type=’oracle_database’ and target_name like ‘%TEST%’;

To install a Management Agent using the agentDeploy script, follow these steps:

1.       On the OMS host, from the OMS home, log in to the EMCLI client. EMCLI Client is available by default with every OMS installation, so you need not install the client separately.

oracle@oms-1 /u01/app/oracle/product/12.0.2/midware/oms/bin $ ./emcli login -username=sysman -password=xxxxxx

2.       Synchronize EMCLI:

oracle@oms-1 /u01/app/oracle/product/12.0.2/midware/oms/bin $ ./emcli sync

Synchronized successfully

3.       Identify the platforms for which the Management Agent software is available on the OMS host:

oracle@metaxa /u01/app/oracle/product/12.0.2/midware/oms/bin $ ./emcli get_supported_platforms

Getting list of platforms …

Check the logs at /u01/app/oracle/product/12.0.2/midware/gc_inst/em/EMGC_OMS1/sysman/emcli/setup/.emcli/agent.log

About to access self-update code path to retrieve the platforms list..

Getting Platforms list  …


Version =

Platform = Oracle Solaris on SPARC (64-bit)


Version =

Platform = Linux x86-64


Version =

Platform = Oracle Solaris on x86-64 (64-bit)


Version =

Platform = Linux x86

4.       Download the Management Agent software from Oracle Software Library to a temporary directory on the OMS host:

$<oms_home>/bin/emcli get_agentimage -destination=<download_directory> -platform=”” -version=

oracle@oms-1 /u01/app/oracle/product/12.0.2/midware/oms/bin $ ./emcli get_agentimage -destination=/tmp -platform=”Oracle Solaris on SPARC (64-bit)” -version=

Platform:Oracle Solaris on SPARC (64-bit)


=== Partition Detail ===

Space free : 21 GB

Space required : 1 GB

Check the logs at /u01/app/oracle/product/12.0.2/midware/gc_inst/em/EMGC_OMS1/sysman/emcli/setup/.emcli/get_agentimage_2012-10-12_11-15-56-AM.log

Setting property ORACLE_HOME to:/u01/app/oracle/product/12.0.2/midware/oms

calling pulloneoffs with arguments:/u01/app/oracle/product/12.0.2/midware/oms/u01/app/oracle/product/12.0.2/midware/oms/sysman/agent/

Check this logs for more information: /u01/app/oracle/product/12.0.2/midware/oms/sysman/prov/agentpush/logs

5.       Transfer the downloaded ZIP file to a temporary directory (/tmp) on the destination host where you want to install the Management Agent.

6.       On the destination host, extract the contents of the ZIP file using the unzip utility

7.       Edit the response file agent.rsp


The following values will go in the response file replacing the # out version; we will need to add the hostname of the host we are installing on in ORACLE_HOSTNAME









8.       Invoke the deployment script and pass the response file:

<software_extract_location>/ AGENT_BASE_DIR=<absolute_path_to_agentbasedir> RESPONSE_FILE=<absolute_path_to_responsefile>

oracle@test-2 /u01/app/oracle/product/stage $ ./ AGENT_BASE_DIR=/u01/app/oracle/product/agent/ RESPONSE_FILE=/u01/app/oracle/product/stage/agent.rsp

9.       Run the root scripts when you are prompted

10.  The ports that need opening if you get issues with the install are 1521, 3872 & 1159 between the OMS and the agent host

Description of Figure 10-1 follows

  • The direction of the arrows specify the direction of ports.
  • Port 1159, 4898-4989 indicates that 1159 is the default. If this port is not available, the Oracle Management Service will search in the specified range (4889 – 4897).
  • To clone between two target hosts separated by a firewall, the agents will need to communicate to each other on the agent ports. The initiating Management Agent will make the call.