em12c

Upgrade Enterprise Manager Cloud Control 12.1.0.1 to 12.1.0.2

Oracle released 12.1.0.2 Enterprise Manager few days back and have released it for most of platforms.

You can directly upgrade Enterprise Manager Cloud Control 12c Release 1 (12.1.0.1) [with or without Bundle Patch 1] to 12.1.0.2
There are no pre patches required for this. But this upgrade requires considerable downtime. Oracle has termed this upgrade as 1-system upgrade approach which means that upgrades your Enterprise Manager Cloud Control on the same host—upgrades Oracle Management Service (OMS) on the same host and Oracle Management Repository (Management Repository) in the existing database.

I decided to upgrade my test EM 12c setup running on RHEL 5.6 x86_64 bit with single OMS and 11.2.0.3 database.Whole upgrade went fine without any major issues. To get started you need to download the software from here

I will be upgrading 12.1.0.1 running on Linux x86_64 bit. You can download the software from
http://download.oracle.com/otn/linux/oem/121020/em12cr2_linux64_disk1.zip
http://download.oracle.com/otn/linux/oem/121020/em12cr2_linux64_disk2.zip
http://download.oracle.com/otn/linux/oem/121020/em12cr2_linux64_disk3.zip

Once all files are downloaded, unzip them in single directory location.
To start the installation , run the runInstaller

./runInstaller

First screen asks for MOS details. You can choose to ignore it by unchecking box and click next.This will generate warning, press ok and click next

Next screen is related to software updates. You can “search for updates” and then select “My Oracle Support” to download the updates.We opted to “skip” this part.

On pre-requisite screen, installer checks whether your environment meets all the minimum requirements for a successful upgrade.
If some checks result in Warning or Failed status, then investigate and correct the problems before you proceed with the upgrade.

On the Installation Types screen, select Upgrade an Existing Enterprise Manager System, then select One System Upgrade. Then, select the OMS home you want to upgrade.

Next select the location for middleware home. 12.1.0.2 is out of place upgrade,so you need to specify new middleware home (without EM grid control) or a new home.

Next screen you pass connection details for EM repository.After you enter sys/sysman password it prompts you to stop oms

Stop the OMS using emctl utility.

$OMS_HOME/bin/emctl stop oms
Oracle Enterprise Manager Cloud Control 12c Release 12.1.0.1.0
Copyright (c) 1996, 2011 Oracle Corporation. All rights reserved.
Stopping WebTier...
WebTier Successfully Stopped
Stopping Oracle Management Server...
Oracle Management Server Successfully Stopped
Oracle Management Server is Down

Once OMS is stopped, we press ok on message and again click Next.Installer complains for pre-requisite check for emkey .This can be corrected by copying emkey to database repository.

Syntax for this is

$/bin/emctl config emkey -copy_to_repos_from_file -repos_host-repos_port-repos_sid-repos_user[-repos_pwd] -emkey_file/sysman/config/emkey.ora

I have replaced this with actual values for my setup

[oracle@oradbdev04]~% /home/oracle/Middleware/oms/bin/emctl config emkey -copy_to_repos_from_file -repos_host oradbdev04 -repos_port 1521 -repos_sid em12c -repos_user sysman -repos_pwd oracle123 -emkey_file /home/oracle/Middleware/oms/sysman/config/emkey.ora 
Oracle Enterprise Manager Cloud Control 12c Release 12.1.0.1.0  
Copyright (c) 1996, 2011 Oracle Corporation.  All rights reserved.
Enter Admin User's Password : 
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".

Next screen asks you to disable CBO gather stats job and set job_queue_processes to 0. You can press “Yes” and installer will automatically make changes for you.

We got next screen informing about some more pre-requisites which are not mandatory. We clicked ok and skipped them

On the Plug-In Upgrade screen, it will list plugins which are currently installed and new version post upgrade. Review them and click next

On the Plug-In Deployment screen, select the optional plug-ins you want to deploy in addition to the plug-ins that will automatically be upgraded while upgrading the OMS. ( I forgot to take screenshot of this page)

On the Extend WebLogic Server Domain screen , validate Adminserver details and enter WebLogic user account password.This is required to create a new WebLogic domain (GCDomain) on the same port and host name as the AdminServer used by the earlier release of the OMS you are upgrading.

We also need to enter new location for OMS instance base directory. As per oracle docs, it can be either inside or outside middleware home. Recommended approach is to keep it inside middleware home. We decided to use /home/oracle/product/middleware/gc_inst

You are next presented with summary screen and asked to click next

Next screen shows installation progress. This took nearly 1.5 hours.

Last step is to run $OMS_HOME/allroot.sh as root user

[root@oradbdev04 oms]# ./allroot.sh
Starting to execute allroot.sh .........
Starting to execute /home/oracle/product/middleware/oms/root.sh ......
 Running Oracle 11g root.sh script...
The following environment variables are set as:
 ORACLE_OWNER= oracle
 ORACLE_HOME= /home/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
 /home/oracle/product/middleware/oms
 Finished execution of /home/oracle/product/middleware/oms/root.sh ......

 

Press ok on installer and we are finished with 12c installation.

Final screen lists down the url to access Enterprise manager grid control (12.1.0.2) and Weblogic Admin server.


Since one system upgrade only upgrades OMS and repository , we are still left with upgrading our central management agent.

1)Ensure that the Management Agents you want to upgrade are up and running.
2)Ensure that the Management Agents you want to upgrade are secure.

From the Setup menu, select Manage Cloud Control, then select Upgrade Agents. Click Add, select the Management Agents you want to upgrade, then click Select.

Select the Central management agent (which in this case is oradbdev04) and submit the job

Since we do not have root privileges, we have to run the $AGENT_BASE_DIR/core/12.1.0.2.0/root.sh script on the host after the upgrade.

 

You can monitor the agent install process

Note that oracle installs the agent in same base directory but creates new directory 12.1.0.2.0.

Before upgrade
/home/oracle/Middleware/agent/core/12.1.0.1.0

Post upgrade
/home/oracle/Middleware/agent/core/12.1.0.2.0

If you check agent status, you will find that oracle has automatically started the agent from new oracle home.

Run root.sh to complete the upgrade process

[root@oradbdev04 12.1.0.2.0]# ./root.sh
Finished product-specific root actions.
/etc exist
Finished product-specific root actions.

You can now upgrade the other management agent manually on the targets. Agent 12.1.0.1 is compatible with EMGC (12.1.0.2)

References

Oracle® Enterprise Manager Cloud Control Upgrade Guide12c Release 2 (12.1.0.2)

EM12c:Automated discovery of Targets

In this post we will discuss the Automated discovery of Targets in Enterprise Manager Cloud Control(EM 12c). Once you have installed agents, you can schedule automatic discovery of new targets. Let’s get started

1)Click on Add Target>Configure Auto Discovery from the Setup menu

2)Click the Configure icon in the Multiple Target-type Discovery on Single Host row in the Discovery table.

3)Select the host in the table and click Configure.

4)Set the schedule at which the discovery job will be run, in days. This schedule will be applied to all selected hosts. By default the job will run every 24 hours.

Select the Oracle component types you want to search the host for and click Ok.

5)Click “Run Discovery now” and it will report the discovered targets.

6) Next is to configure the Targets. We will first start with oradbdev-clu i.e RAC cluster

We have added all the hosts part of cluster. In case management agent is not installed on all hosts , they will not appear in “Available hosts” list

7)Next we select Cluster database tintin and click on configure

8)You will be required to put dbsnmp password for configuring database montioring. By default dbsnmp account is locked. You can verify using following sql

select username,account_status from dba_users where username='DBSNMP';
USERNAME ACCOUNT_STATUS
------------------------------ --------------------------------
DBSNMP EXPIRED & LOCKED

Unlock and reset password as below

sql>alter user DBSNMP account unlock identified by oracle;

Do test connection and verify all information is correct.

9)Then configure ASM instances and you will be required to enter ASM password

10)We are done now. We can go to Targets ->Databases ->Tintin to view the database. It would look like below

Em12c:Silent Oracle Management agent Installation

This Post would describe how to install Oracle Management Agent 12c in silent mode. We need to download the agent software which can be done using emcli utility which is present on OMS host.Login to OMS host and execute emcli utility as mentioned below

[oracle@oradbdev04]~/Middleware/oms/bin% emcli login -username=sysman
Enter password 

Login successful

We need to now syncronize EMCLI

[oracle@oradbdev04]~/Middleware/oms/bin% emcli sync
Synchronized successfully

Following command gets list of agent software present on grid control

[oracle@oradbdev04]~/Middleware/oms/bin% emcli get_supported_platforms
Getting list of platforms ...
Check the logs at /home/oracle/Middleware/oms/bin/agent.log
About to access self-update code path to retrieve the platforms list..
Getting Platforms list  ...
-----------------------------------------------
Version = 12.1.0.1.0
 Platform = Linux x86-64
-----------------------------------------------
Platforms list displayed successfully.

Since this is a new Grid installation on Linux x86-64 we get only 1 agent software. If you need to install agent on different platform say Solaris, then you need to download software using self update option.
Note that you will have to pass your My oracle support credentials while configuring self-update.

Since our target host is also Linux x86-64 we can proceed. In below example we have specified that our 12.1.0.1.0 agent software should be placed in /tmp for Linux x86-64 platform

[oracle@oradbdev04]~/Middleware/oms/bin% ./emcli get_agentimage -destination=/tmp -platform="Linux x86-64" -version=12.1.0.1.0
Platform:Linux x86-64
Destination:/tmp
 === Partition Detail ===
Space free : 3 GB
Space required : 1 GB
Check the logs at /tmp/get_agentimage_2012-02-04_11-56-01-AM.log
Setting property ORACLE_HOME to:/home/oracle/Middleware/oms
calling pulloneoffs with arguments:/home/oracle/Middleware/oms/home/oracle/Middleware/oms/sysman/agent/12.1.0.1.0_AgentCore_226.zip12.1.0.1.0linux_x64
Check this logs for more information: /home/oracle/Middleware/oms/sysman/prov/agentpush/logs
[oracle@oradbdev04]~/Middleware/oms/bin% ls -l /tmp/12.1.0.1.0_AgentCore_226.zip
-rw-r----- 1 oracle dba 235679029 Feb  4 11:56 /tmp/12.1.0.1.0_AgentCore_226.zip

You should copy this file to the target host and unzip it.

To perform installation , we need to use agentDeploy.sh script. You can either use agent.rsp in unzipped directory or pass parameters at command line

AGENT_BASE_DIR ->Location where Agent software will be installed
OMS_HOST –>OMS host name
EM_UPLOAD_PORT –>Agent upload port. Script will try both http/https port.
AGENT_REGISTRATION_PASSWORD –>Password for secure registration with OMS

e.g
agentDeploy.sh AGENT_BASE_DIR=/home/oracle/agent12c OMS_HOST=oradbdev04 EM_UPLOAD_PORT=4900 AGENT_REGISTRATION_PASSWORD=oracle123

You will be prompted to run root.sh as below

-bash-3.2$ sudo /home/oracle/agent12c/core/12.1.0.1.0/root.sh
Password:
Finished product-specific root actions.
/etc exist

Creating /etc/oragchomelist file...
Finished product-specific root actions.

Verify following commands are working properly

cd $AGENT_HOME/core/12.1.0.1.0/bin
./emctl status agent
./emctl upload agent

$ ./emctl upload agent
Oracle Enterprise Manager 12c Cloud Control 12.1.0.1.0
Copyright (c) 1996, 2011 Oracle Corporation.  All rights reserved.
---------------------------------------------------------------
EMD upload completed successfully

Next step is to discover the targets. You can either manually add them or use automated discovery of new Oracle targets on machines which already have agent installed. Refer to EM12c:Automated discovery of Targets for automatic discovery and target configuration.