Upgrading Grid Control 10.2.0.5 to OEM 12c Cloud Control

Upgrading Grid Control 10.2.0.5 to OEM 12c Cloud Control
This note describes how to do what is called a 2-System Upgrade Approach to upgrade an existing 10.2.0.5 Grid Control environment to OEM
12c.
We will then see how to upgrade one of the existing 10g Management Agents to 12c.
Note that the OMS (Oracle Management Service) 12c communicates only with Oracle Management Agent 12c.
This approach enables you to install Enterprise Manager Cloud Control on a host that is different from the host where your existing Enterprise
Manager system is running. So we largely leave our existing 10g OEM environment intact.
We basically take a backup of the existing 10g OEM repository database and restore the same on another host. We then use this restored
database to perform the 12c upgrade.
We then upgrade the existing 10g agents to 12c.
So in this method, we have two environments existing side by side and we migrate and upgrade agents on a piecemeal basis.
Advantage of this method is that there is minimal or zero downtime involved.
Pre-Upgrade Tasks
Apply the preupgrade console patch on your existing Enterprise Manager system to get access to the Enterprise Manager 12c Upgrade
Console.
The Preupgrade Console is the starting point for upgrading your Enterprise Manager 10g Grid Control Release 5 (10.2.0.5.0) or Enterprise
Manager 11g Grid Control Release 1 (11.1.0.1.0) to Enterprise Manager Cloud Control.
To access the Enterprise Manager 12c Upgrade Console page in the 10g OEM Grid Control, apply the preupgrade console patch on your
existing Enterprise Manager system
Note : Stop 10g OMS to apply patch
Apply patch 10044087
[oracle@kens-db-049 10044087]$ opatch apply
Invoking OPatch 10.2.0.4.9
Oracle Interim Patch Installer version 10.2.0.4.9
Copyright (c) 2009, Oracle Corporation. All rights reserved.
Oracle Home
Central Inventory
from
OPatch version
OUI version
OUI location
Log file location
:
:
:
:
:
:
:
/u01/app/oracle/product/oms10g
/home/oracle/oraInventory
/etc/oraInst.loc
10.2.0.4.9
10.2.0.5.0
/u01/app/oracle/product/oms10g/oui
/u01/app/oracle/product/oms10g/cfgtoollogs/opatch/opatch2011-12-28_11-44-57AM.log
Patch history file: /u01/app/oracle/product/oms10g/cfgtoollogs/opatch/opatch_history.txt
ApplySession applying interim patch '10044087' to OH '/u01/app/oracle/product/oms10g'
Running prerequisite checks...
OPatch detected non-cluster Oracle Home from the inventory and will patch the local system only.
Backing up files and inventory (not for auto-rollback) for the Oracle Home
Backing up files affected by the patch '10044087' for restore. This might take a while...
Backing up files affected by the patch '10044087' for rollback. This might take a while...
Patching component oracle.sysman.console.oms, 10.2.0.5.0...
Updating jar file "/u01/app/oracle/product/oms10g/sysman/jlib/emCORE.jar" with
"/sysman/jlib/emCORE.jar/oracle/sysman/eml/upgrade/preupg/plugin_support/UnzipHelperContext.class"
…..
……
Verifying the update...
Inventory check OK: Patch ID 10044087 is registered in Oracle Home inventory with proper meta-data.
Files check OK: Files from Patch ID 10044087 are present in Oracle Home.
Execution of 'sh /home/oracle/10044087/custom/scripts/post -apply 10044087 ':
0 [main] DEBUG emSDK.util.help - processing config file locale : _en_US
1053 [main] DEBUG emSDK.util.help - processing config file locale : _de
1087 [main] DEBUG emSDK.util.help - processing config file locale : _es
1120 [main] DEBUG emSDK.util.help - processing config file locale : _fr
1147 [main] DEBUG emSDK.util.help - processing config file locale : _ja
1168 [main] DEBUG emSDK.util.help - processing config file locale : _ko
1197 [main] DEBUG emSDK.util.help - processing config file locale : _pt_BR
1215 [main] DEBUG emSDK.util.help - processing config file locale : _zh_CN
1234 [main] DEBUG emSDK.util.help - processing config file locale : _zh_TW
1252 [main] DEBUG emSDK.util.help - processing config file locale : _it
Return Code = 0
OPatch succeeded.
Connect to SQLPLUS as the SYS user , and run the following sql scripts:
SQL>@/u01/app/oracle/product/oms10g/sysman/preupgc/puc_dblink_pkgdef.sql
SQL>@/u01/app/oracle/product/oms10g/sysman/preupgc/puc_dblink_pkgbody.sql
Connect to SQLPLUS as the Management Repository owner SYSMAN, and run the pre_upg_console.sql script:
SQL>@/u01/app/oracle/product/oms10g/sysman/preupgc/pre_upg_console.sql
Now Start the 10g OMS
Under the Deployments tab in 10g OEM Grid Control, we can now see the Upgrade Console page
Provide information about the host for the 12c OMS
From the Deployments page in the 10g OEM Grid Control click Enterprise Manager 12c Upgrade Console
Select 2-System.
Click Identify Host and Port for New Enterprise Manager System
Provide information about the 12c Grid Control software and plug-ins which we have downloaded from OTN
http://www.oracle.com/technetwork/oem/grid-control/downloads/oem-upgrade-console-502238.html
Download the Management Agent software from the Enterprise Manager download page on Oracle Technology Network (OTN) to a directory
accessible by the OMS.
Download all the required plug-ins from the Enterprise Manager download page on OTN to the same directory
Note: Do NOT extract the contents of the software ZIP file.
Also download all the plug-ins listed as required plug-ins on the Manage page, whether or not you want to monitor a target with them.
From the Deployments page in the 10g OEM Grid Control click Enterprise Manager 12c Upgrade Console
Select 2-System.
Click Manage Software.
In the Provide Software Location section, enter the path to the directory where the core 12c Management Agent software and the plug-in
software are present for the required platforms.
Then click Validate to register that location with the Enterprise Manager system. Note – the validation takes a bit of time.
Restore a backup of the existing 10g OEM Repository database on the server which will host the 12c Repository
database
We now use RMAN ( or any other method of choice) to restore a backup of the existing 10g OEM repository database on the server which is
going to host the 12c OEM repository database and recover the database until a point in time.
Make a note of the log sequence number or time until which the database has been recovered.
Install the 12c Grid Control Software
SQL> SQL> exec dbms_scheduler.disable('SYS.GATHER_STATS_JOB');
PL/SQL procedure successfully completed.
SQL> commit;
Commit complete.
SQL> show parameter job
NAME
TYPE
VALUE
------------------------------------ ----------- -----------------------------job_queue_processes
integer 10
SQL> alter system set job_queue_processes=0;
System altered.
SQL> show parameter nls
NAME
-----------------------------------nls_calendar
nls_comp
nls_currency
nls_date_format
nls_date_language
nls_dual_currency
nls_iso_currency
nls_language
nls_length_semantics
nls_nchar_conv_excp
nls_numeric_characters
TYPE
----------string
string
string
string
string
string
string
string
string
string
string
NAME
-----------------------------------nls_sort
nls_territory
nls_time_format
nls_time_tz_format
nls_timestamp_format
nls_timestamp_tz_format
TYPE
VALUE
----------- -----------------------------string
string
AMERICA
string
string
string
string
SQL> grant execute on dbms_random to dbsnmp;
Grant succeeded.
SQL> grant execute on dbms_random to sysman;
Grant succeeded.
SQL> alter user oracle_ocm account unlock;
VALUE
------------------------------
AMERICAN
byte
FALSE
User altered.
SQL> alter system set processes=300 scope=spfile;
System altered.
SQL> show parameter sga
NAME
-----------------------------------lock_sga
pre_page_sga
sga_max_size
sga_target
TYPE
----------boolean
boolean
big integer
big integer
VALUE
-----------------------------FALSE
FALSE
1G
1G
SQL> alter system set sga_max_size=2G scope=spfile;
System altered.
SQL> alter system set sga_target=2G scope=spfile;
System altered.
SQL> show parameter stream
NAME
TYPE
VALUE
------------------------------------ ----------- -----------------------------streams_pool_size
big integer 48M
SQL> alter system set streams_pool_size=300m;
System altered.
SQL> show parameter compat
NAME
-----------------------------------compatible
plsql_v2_compatibility
TYPE
----------string
boolean
VALUE
-----------------------------10.1.0.3.0
FALSE
SQL> alter system set compatible='10.2.0.4' scope=spfile;
System altered.
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup;
ORACLE instance started.
Total System Global Area 2147483648 bytes
Fixed Size
2097696 bytes
Variable Size
738201056 bytes
Database Buffers
1392508928 bytes
Redo Buffers
14675968 bytes
Database mounted.
Database opened.
SQL>
[root@kens-orasql-002-uat ~]# /hds002/oracle/product/Middleware/oms/allroot.sh
Starting to execute allroot.sh .........
Starting to execute /hds002/oracle/product/Middleware/oms/root.sh ......
Running Oracle 11g root.sh script...
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /hds002/oracle/product/Middleware/oms
Enter the full pathname of the local bin directory: [/usr/local/bin]:
The file "dbhome" already exists in /usr/local/bin. Overwrite it? (y/n)
[n]:
The file "oraenv" already exists in /usr/local/bin. Overwrite it? (y/n)
[n]:
The file "coraenv" already exists in /usr/local/bin. Overwrite it? (y/n)
[n]:
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
/etc exist
Creating /etc/oragchomelist file...
/hds002/oracle/product/Middleware/oms
Finished execution of /hds002/oracle/product/Middleware/oms/root.sh ......
Starting to execute /hds002/oracle/product/Middleware/agent/core/12.1.0.1.0/root.sh ......
Finished product-specific root actions.
/etc exist
Finished execution of /hds002/oracle/product/Middleware/agent/core/12.1.0.1.0/root.sh ......
On the Deployments tab in 10g Grid Control click Enterprise Manager 12c Upgrade Console.
click Deploy and Configure Agents
Under Operation Name, enter a unique name for the agent deployment operation.
In the Select Operation Type section, select Deploy Agent and Plug-In Software and Configure Agent and Plug-In Software
We are only upgrading one of the 10g agents to 12c. Select the agent to upgrade
Select the base directory for the 12c agent installation and the 12c agent instance name
Before we switch over from the existing 10g Management Agent to the newly deployed and configured Oracle Management Agent 12c, we can
generate a report to check the health and the readiness of the deployed Management Agents.
Before switching over from the old, existing 10g Management Agent to the newly deployed and configured Oracle Management Agent 12c,
verify and sign off the health report of deployed Management Agents.
We need to ensure that the 12c Management Agents are in a position to contact the upgraded 12c Oracle Management Service (OMS) and
monitor all the targets they monitored before the upgrade.
We need to run the root.sh for the newly deployed 12c agent
cd /u01/app/oracle/product/agent12g/
[oracle@kens-db-049 product]$ cd agent12g/
[oracle@kens-db-049 agent12g]$ ls
agentimage.properties agent_inst core plugins plugins.txt plugins.txt.status sbin tmp_2011_12_30_10_44_37_93
[oracle@kens-db-049 agent12g]$ cd ./core/12.1.0.1.0/
[oracle@kens-db-049 12.1.0.1.0]$ su
Password:
[root@kens-db-049 12.1.0.1.0]# ./root.sh
Finished product-specific root actions.
/etc exist
Creating /etc/oragchomelist file...
/u01/app/oracle/product/agent12g/core/12.1.0.1.0
Finished product-specific root actions.
[root@kens-db-049 12.1.0.1.0]#
Switching Over to Oracle Management Agent 12c
[oracle@kens-orasql-002-uat oracle]$ cd /hds002/oracle/product/Middleware/
[oracle@kens-orasql-002-uat Middleware]$ cd gc_inst
[oracle@kens-orasql-002-uat gc_inst]$ cat ./em/EMGC_OMS1/emgc.properties |grep EM_REPOS_CONNECTDESCRIPTOR
EM_REPOS_CONNECTDESCRIPTOR=(DESCRIPTION\=(ADDRESS_LIST\=(ADDRESS\=(PROTOCOL\=TCP)(HOST\=kens-orasql-002uat)(PORT\=1521)))(CONNECT_DATA\=(SID\=oramgnt)))
[oracle@kens-orasql-002-uat gc_inst]$
SQL> select owner from dba_db_links where
2 db_link='PREUPGTO_NG_LINK.CALM.WA.GOV.AU';
OWNER
-----------------------------PUBLIC
SQL> select * from dual@PREUPGTO_NG_LINK.CALM.WA.GOV.AU;
D
X
Remove the upgraded agent from 10g Grid Control
[oracle@kens-db-049 bin]$ pwd
/u01/app/oracle/product/agent12g/core/12.1.0.1.0/bin
[oracle@kens-db-049 bin]$ ./emctl status agent
Oracle Enterprise Manager 12c Cloud Control 12.1.0.1.0
Copyright (c) 1996, 2011 Oracle Corporation. All rights reserved.
--------------------------------------------------------------Agent Version
: 12.1.0.1.0
OMS Version
: 12.1.0.1.0
Protocol Version : 12.1.0.1.0
Agent Home
: /u01/app/oracle/product/agent12g/agent_inst
Agent Binaries
: /u01/app/oracle/product/agent12g/core/12.1.0.1.0
Agent Process ID : 10557
Parent Process ID : 10456
Agent URL
: https://kens-db-049.corporateict.domain:3872/emd/main/
Repository URL
: https://kens-orasql-002-uat.corporateict.domain:1159/empbs/upload/
Started at
: 2011-12-30 11:38:55
Started by user
: oracle
Last Reload
: (none)
Last successful upload
: 2011-12-30 11:58:51
Last attempted upload
: 2011-12-30 11:58:51
Total Megabytes of XML files uploaded so far : 1.71
Number of XML files pending upload
: 0
Size of XML files pending upload(MB)
: 0
Available disk space on upload filesystem
: 44.49%
Collection Status
: Collections enabled
Last attempted heartbeat to OMS
: 2011-12-30 11:59:06
Last successful heartbeat to OMS
: 2011-12-30 11:59:06
--------------------------------------------------------------Agent is Running and Ready