Saturday, February 11, 2012

Upgrading Grid Control 11g to 12c - 2

Earlier post showed the installing of pre-upgrade patch and switching agents to 12c. This post shows the rest of the upgrade steps which is upgrading of OMS and deinstalling the old OMS and agents.

Download the new Grid control software, copy the downloaded files to the host where grid control is currently installed and unzip the two files.

Shutdown the OMS with
emctl stop oms
It is important to stop it without the "-all" option. If the OMS is stopped with "-all" option then following warning will appear during the upgrade.
Another thing that can come up is the following error.
To fix this start the OMS and run
emctl config emkey -copy_to_repos -sysman_pwd gridb321
Oracle Enterprise Manager 11g Release 1 Grid Control
Copyright (c) 1996, 2010 Oracle Corporation.  All rights reserved.
The EMKey has been copied to the Management Repository. This operation will cause the EMKey to become unsecure.
After the required operation has been completed, secure the EMKey by running "emctl config emkey -remove_from_repos".
After this stop the oms again (without the -all option) and rerun the installer.

There other warnings and errors where some would allow to continue whereas others would require some steps to correct these warnings.



To fix these warnings
SQL> grant execute on dbms_random to dbsnmp;
Grant succeeded.

SQL> grant execute on dbms_random to sysman;
Grant succeeded.

SQL> select account_status,username from dba_users where username='ORACLE_OCM';

ACCOUNT_STATUS     USERNAME
------------------ -----------
EXPIRED & LOCKED   ORACLE_OCM

SQL> alter user oracle_ocm account unlock;
User altered.

SQL> alter user oracle_ocm identified by ******;
User altered.

SQL> select * from v$log;

    GROUP#    THREAD#  SEQUENCE#      BYTES    MEMBERS ARC STATUS           FIRST_CHANGE# FIRST_TIM
---------- ---------- ---------- ---------- ---------- --- ---------------- ------------- ---------
         1          1        376   52428800          2 YES INACTIVE               6438727 10-FEB-12
         2          1        377   52428800          2 YES INACTIVE               6452498 10-FEB-12
         3          1        378   52428800          2 NO  CURRENT                6483486 10-FEB-12

SQL> alter database drop logfile group 1; -- do for other groups as well
Database altered.

SQL> alter database add logfile group 1 size 300M;
Database altered.

SQL>  select * from v$log;

    GROUP#    THREAD#  SEQUENCE#      BYTES    MEMBERS ARC STATUS           FIRST_CHANGE# FIRST_TIM
---------- ---------- ---------- ---------- ---------- --- ---------------- ------------- ---------
         1          1        379  314572800          2 NO  CURRENT                6521242 10-FEB-12
         2          1          0  314572800          2 YES UNUSED                       0
         3          1          0  314572800          2 YES UNUSED                       0
Some steps (eg step 5) in the install process take longer to complete and at times there will be movement on the progress bar. It is not stuck and it will help to keep and eye on the logs as well. Logs for installation is available in Middleware12/oms/sysman/logs (Middleware12 is directory for new installation). As part of the install WebLogic server 10.3.5 will be installed.











# /opt/app/oracle/Middleware12/oms/allroot.sh

Starting to execute allroot.sh .........

Starting to execute /opt/app/oracle/Middleware12/oms/root.sh ......
Running Oracle 11g root.sh script...

The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /opt/app/oracle/Middleware12/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
/opt/app/oracle/Middleware12/oms
Finished execution of  /opt/app/oracle/Middleware12/oms/root.sh ......
At the end of the upgrade the 12c agents switched earlier can now communicate with the OMS. Checking the status of the agents shows
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        : /opt/app/oracle/grid_agent/agent12g/agent_inst
Agent Binaries    : /opt/app/oracle/grid_agent/agent12g/core/12.1.0.1.0
Agent Process ID  : 4072
Parent Process ID : 3935
Agent URL         : https://rac1. .net:3872/emd/main
Repository URL    : https://hpc4. .net:4900/empbs/upload
Started at        : 2012-02-09 16:26:48
Started by user   : oracle
Last Reload       : (none)
Last successful upload                       : 2012-02-10 12:59:01
Last attempted upload                        : 2012-02-10 12:59:01
Total Megabytes of XML files uploaded so far : 2.44
Number of XML files pending upload           : 0
Size of XML files pending upload(MB)         : 0
Available disk space on upload filesystem    : 13.31%
Collection Status                            : Collections enabled
Last attempted heartbeat to OMS              : 2012-02-10 13:02:12
Last successful heartbeat to OMS             : 2012-02-10 13:02:12

---------------------------------------------------------------
Agent is Running and Ready
Status from old agent shows it's running but not communicating with OMS anymore
emctl status agent
Oracle Enterprise Manager 11g Release 1 Grid Control 11.1.0.1.0
Copyright (c) 1996, 2010 Oracle Corporation.  All rights reserved.
---------------------------------------------------------------
Content-Length: 0
Server: Jetty(7.0.1.v20091125)

---------------------------------------------------------------
Agent is Running but Not Ready
This completes the upgrade part of grid control from 11g
to 12c

12c grid control Home page.

It could be seen that agents from exisiting hosts have already started communicating with new OMS.

12c's new ASH Analytics page

Last step is to deinstall the old agents and OMS.
To deinstall the agents from local and remote hosts including RAC follow the agent deinstall post or How to Remove the 11.1.0.1.0 Grid Control Management Agent with the Silent Method [ID 1068036.1].

For OMS use How to Deinstall 11g Grid Control Components in Graphical Mode

More inforation is available from Enterprise Manager Grid Control Advanced Installation and Configuration Guide

To enable/disable the auto start of any agent
chkconfig gcstartup on/off
chkconfig --list | grep gcstartup
gcstartup       0:off   1:off   2:on    3:on    4:on    5:on    6:off

Useful metalink notes
How to Remove the 11.1.0.1.0 Grid Control Management Agent with the Silent Method [ID 1068036.1]
12c: Cluster Database Target Remains in Pending Delete Status Indefinetely after Re-adding [ID 1403833.1]
12C Cloud Control: How to De-install 12C Agent [ID 1368088.1]
How To De-Install EM 12c Cloud Control [ID 1363418.1]
How to Delete One Node from a RAC Cluster in EM 12c? [ID 1391107.1]
How to Deploy the Latest Database Plugin to the OMS and the Agent in 12C Cloud Control [ID 1388143.1]
EM 12c: How to Install EM 12c Agent using Silent Install Method with Response File [ID 1360083.1]
EM 12c: How to Install Enterprise Manager 12.1.0.1 Using Silent Method [ID 1361643.1]
How to install Enterprise Manager Cloud Control 12c Agent on Linux [ID 1360183.1]