Tuesday, June 4, 2013

Upgrade from OEM 11g to 12c: Step DeployAgentNotRequired ignores agent deployment

We created a new OEM 12c [12.1.0.2.2], using the 2-system upgrade approach from our OEM 11g.

I tried to run the "Deploy and Configure Agent" step on 2 servers A and B and the installation proceeded only to server A. For server B, I was getting a "DeployAgentNotRequired" step with output "Ignoring deployment".

The problem was that there is wrong information in the repository and OEM considered some agents as NFS shared, even though they were not.

Execute the following query as SYSMAN in your OEM 11g repository database and identify which of those agents considered as NFS shared, actually are not.
SELECT TARGET_NAME, MASTER_AGENT_GUID, TARGET_GUID, IS_SHARED
FROM SYSMAN.PRE_UPGC_AGT_STAT_MGMT
WHERE IS_SHARED=1;

Keep the TARGET_NAME of those agents (for our example "B:3872") and set IS_SHARED=0 for them:
UPDATE SYSMAN.PRE_UPGC_AGT_STAT_MGMT
SET IS_SHARED = '0', MASTER_AGENT_GUID=TARGET_GUID
WHERE TARGET_NAME='B:3872';

COMMIT;

Also, check their predeployment status [PRE_DEP_STATUS column] and if the value is STATUS_SUCCESS, change it to STATUS_FAILED:
SELECT TARGET_NAME, PRE_DEP_STATUS
FROM SYSMAN.PRE_UPGC_AGT_STAT_MGMT
WHERE TARGET_NAME = 'B:3872';

UPDATE SYSMAN.PRE_UPGC_AGT_STAT_MGMT
SET PRE_DEP_STATUS='STATUS_FAILED'
WHERE TARGET_NAME = 'B:3872';

COMMIT;

Now, retry the "Deploy and Configure Agent" step for those servers.

Wednesday, April 24, 2013

Upgrade from OEM 11g to 12c: Step unzipAndDeploySoftware fails

We created a new OEM 12c [12.1.0.2.2], using the 2-system upgrade approach from our OEM 11g.

I tried to run the "Deploy and Configure Agent" step on a Linux 64-bit machine and unzipAndDeploySoftware step failed with error:
Check complete: Failed <<<<
Problem: The 32bit software cannot be installed on a 64 bit platform. Similarly the vice-versa is also true where 64bit product cannot be installed on a 32bit machine.
Recommendation: Please install the software on a 32-bit machine if the product is 32bit, otherwise install the product on the 64bit machine if it is a 64bit software.

This is Bug 15995299.
The problem is the OS has been discovered as a Linux 32-bit by the upgrade process.
SELECT TARGET_NAME, PLATFORM_ID, PLATFORM_NAME, CURRENT_VERSION
FROM SYSMAN.PRE_UPGC_AGT_STAT_MGMT
WHERE TARGET_NAME='your_server:3872';

TARGET_NAMEPLATFORM_IDPLATFORM_NAMECURRENT_VERSION
your_server:387246Linux x8611.1.0.1.0

Also, the targets which are monitored by that agent have wrong information:
SELECT EMD_URL, AGENT_NAME, TARGET_NAME, TARGET_TYPE, PLATFORM_ID, PLATFORM_NAME
FROM SYSMAN.PRE_UPGC_TGT_SW
WHERE AGENT_NAME='your_server:3872';

EMD_URLAGENT_NAMETARGET_NAMETARGET_TYPEPLATFORM_IDPLATFORM_NAME
https://your_server:3872/emd/main/your_server:3872your_server:3872oracle_emd46Linux x86
https://your_server:3872/emd/main/your_server:3872your_serverhost46Linux x86

You have to update these tables with the correct OS information:
UPDATE SYSMAN.PRE_UPGC_AGT_STAT_MGMT
    SET PLATFORM_ID='226', PLATFORM_NAME='Linux x86-64'
WHERE TARGET_NAME ='your_server:3872';

UPDATE SYSMAN.PRE_UPGC_TGT_SW SW
SET (PLATFORM_ID,PLATFORM_NAME,OS_VERSION ) =
(SELECT DISTINCT AGT.PLATFORM_ID,AGT.PLATFORM_NAME,AGT.OS_VERSION 
FROM SYSMAN.PRE_UPGC_AGT_STAT_MGMT AGT, SYSMAN.PRE_UPGC_TGT_SW TGT
WHERE TGT.TARGET_GUID=AGT.TARGET_GUID AND SW.EMD_URL=TGT.EMD_URL);

COMMIT;

 Rerun the "Deploy and Configure Agent" step for the particular agent.

You may also check Oracle Note 1519366.1: EM 12c: PreUpgrade Console shows Linux 64-bit Host As 32-bit for RHEL / OEL 5 64-bit servers.

Friday, April 19, 2013

Upgrade from OEM 11g to 12c: EM Console Service & EM Jobs Service have status Pending, Database System discovered had no members and status Pending.

We created a new OEM 12c [12.1.0.2.2], using the 2-system upgrade approach from our OEM 11g.
The first agent I installed, in the machine where I installed OMS and repository database had every target discovered with status Up, except the Database System, which had status Pending.
Also, EM Console Service & EM Jobs Service had status Pending.

Strangely, both issues had the same solution.
Although, in our old 11g repository database the parameter job_queue_processes had a value of 1000, some where in the upgrade process, in the new 12c repository database this changed to 0.
Probably, that happened during the database upgrade from 11.2.0.2 to 11.2.0.3 using dbua.

So the solution was:
Run as SYS:
SQL> show parameter job_queue_processes

NAME                TYPE     VALUE
------------------- -------- -----
job_queue_processes integer  0

SQL> ALTER SYSTEM SET job_queue_processes=1000 SCOPE=BOTH;
System altered.

SQL> show parameter  job_queue_processes

NAME                TYPE     VALUE
------------------- -------- -----
job_queue_processes integer  1000


Run as SYSMAN:
SQL> exec  emd_maintenance.remove_em_dbms_jobs;
PL/SQL procedure successfully completed.

SQL> exec emd_maintenance.submit_em_dbms_jobs;
PL/SQL procedure successfully completed.