Oracle DBA Tips and Techniques

By Arjun Raja

Archive for December, 2010

GRID CONTROL PATCH FOR AIX OMS.

Posted by Arjun Raja on December 7, 2010

GRID CONTROL PATCH –

If the SSL certificate used by your AIX GRID CONTROL is going to expire on Dec 31st, a patch needs to be applied using opatch.

Refer Metalink note 1181173.1 to confirm if you need to apply the patch.

If you need to apply the patch, download patch from metalink – patch number 10034237.

Transfer zip file to staging area and unzip the file on the server containing the OMS for Grid Control –

cd /u01/oracle/stage >

unzip p10034237_102050_Generic.zip

Creates a new directory 10034237

Login to the machine and export the ORACLE_HOME to match the OMS home.

cd $ORACLE_HOME/bin

/u01/oracle/product/grid/oms10g/bin

./emctl status oms

[PROD] emrep:/u01/oracle/product/grid/oms10g/bin > ./emctl status oms
Oracle Enterprise Manager 10g Release 5 Grid Control
Copyright (c) 1996, 2009 Oracle Corporation. All rights reserved.
Oracle Management Server is Up.
[PROD] emrep:/u01/oracle/product/grid/oms10g/bin >

NOW STOP OMS

./emctl stop oms

cd /u01/oracle/stage/10034237

Now apply patch –

[PROD] emrep:/u01/oracle/stage/10034237 > opatch apply
Invoking OPatch 10.2.0.5.1

Oracle Interim Patch Installer version 10.2.0.5.1
Copyright (c) 2010, Oracle Corporation. All rights reserved.

Oracle Home : /u01/oracle/product/grid/oms10g
Central Inventory : /u01/oracle/oraInventory
from : /etc/oraInst.loc
OPatch version : 10.2.0.5.1
OUI version : 10.2.0.5.0
OUI location : /u01/oracle/product/grid/oms10g/oui
Log file location : /u01/oracle/product/grid/oms10g/cfgtoollogs/opatch/opatch2010-12-03_11-06-33AM.log

Patch history file: /u01/oracle/product/grid/oms10g/cfgtoollogs/opatch/opatch_history.txt

ApplySession applying interim patch ‘10034237’ to OH ‘/u01/oracle/product/grid/oms10g’
Running prerequisite checks…
Provide your email address to be informed of security issues, install and
initiate Oracle Configuration Manager. Easier for you if you use your My
Oracle Support Email address/User Name.
Visit http://www.oracle.com/support/policies.html for details.
Email address/User Name:

You have not provided an email address for notification of security issues.
Do you wish to remain uninformed of security issues ([Y]es, [N]o) [N]: Y
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 ‘10034237’ for restore. This might take a while…
Backing up files affected by the patch ‘10034237’ for rollback. This might take a while…

Patching component oracle.sysman.top.oms, 10.2.0.5.0…
Updating jar file "/u01/oracle/product/grid/oms10g/sysman/jlib/emd_java.jar" with "/sysman/jlib/emd_java.jar/oracle/sysman/emSDK/emd/comm/EMDClient$1.class"
Updating jar file "/u01/oracle/product/grid/oms10g/sysman/jlib/emd_java.jar" with "/sysman/jlib/emd_java.jar/oracle/sysman/emSDK/emd/comm/EMDClient$EMDClientTrustManager.class"
Updating jar file "/u01/oracle/product/grid/oms10g/sysman/jlib/emd_java.jar" with "/sysman/jlib/emd_java.jar/oracle/sysman/emSDK/emd/comm/EMDClient$MetricResultSetImpl.class"
Updating jar file "/u01/oracle/product/grid/oms10g/sysman/jlib/emCORE.jar" with "/sysman/jlib/emCORE.jar/oracle/sysman/emdrep/jobs/commands/SecureAgentRemoteOp.class"
Updating jar file "/u01/oracle/product/grid/oms10g/sysman/emcli/clientsideext/standardclientside.jar" with "/sysman/emcli/clientsideext/standardclientside.jar/oracle/sysman/emdrep/user_model/emcli/UserClientSideInventory.class"
Updating jar file "/u01/oracle/product/grid/oms10g/sysman/emcli/omssideext/standardomsside.jar" with "/sysman/emcli/omssideext/standardomsside.jar/oracle/sysman/emdrep/user_model/emcli/UserOMSSideInventory.class"
Copying file to "/u01/oracle/product/grid/oms10g/bin/SecureOMSCmds.pm"
Copying file to "/u01/oracle/product/grid/oms10g/sysman/config/emdclient.properties"
Copying file to "/u01/oracle/product/grid/oms10g/sysman/admin/emdrep/sql/core/latest/jobTypes_sql/SecureAgent.sql"
Copying file to "/u01/oracle/product/grid/oms10g/sysman/emdrep/scripts/SecureAgent_oms.pl"
ApplySession adding interim patch ‘10034237’ to inventory
Verifying the update…
Inventory check OK: Patch ID 10034237 is registered in Oracle Home inventory with proper meta-data.
Files check OK: Files from Patch ID 10034237 are present in Oracle Home.

OPatch succeeded.

Now run post_install_script.sql –

Must be in /u01/oracle/stage/10034237 directory before running script and from OMS ORACLE_HOME.

[PROD] emrep:/u01/oracle/stage/10034237 > sqlplus sysman@emrep

SQL*Plus: Release 10.1.0.4.2 – Production on Fri Dec 3 11:09:41 2010

Copyright (c) 1982, 2005, Oracle. All rights reserved.

Enter password:

Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 – 64bit Production
With the Partitioning, Oracle Label Security and Real Application Testing options

SQL> @post_install_script.sql

Last few lines –

PL/SQL procedure successfully completed.

SQL> COMMIT;

Commit complete.

SQL> SET ECHO OFF

Package created.

No errors.

Package body created.

No errors.

PL/SQL procedure successfully completed.

PL/SQL procedure successfully completed.

job_queue_processes value after running post_install_script

—————- —————
SID Job Queue value
—————- —————
emrep 99

PL/SQL procedure successfully completed.

SQL> exit

ONCE COMPLETE – START OMS

[PROD] emrep:/u01/oracle > cd $ORACLE_HOME/bin
[PROD] emrep:/u01/oracle/product/grid/oms10g/bin > ./emctl start oms
Oracle Enterprise Manager 10g Release 5 Grid Control
Copyright (c) 1996, 2009 Oracle Corporation. All rights reserved.
opmnctl: opmn is already running
Starting HTTP Server …
Starting Oracle Management Server …
opmnctl: opmn is already running
Starting HTTP Server …
Starting Oracle Management Server …
Checking Oracle Management Server Status …
Oracle Management Server is Up.
[PROD] emrep:/u01/oracle/product/grid/oms10g/bin >

Once started issue foll command

From ORACLE_HOME/bin
[PROD] emrep:/u01/oracle/product/grid/oms10g/bin > emcli sync – To install emcli tool refer metalink note /u01/oracle/product/grid/oms10g/bin
Synchronized successfully

[PROD] emrep:/u01/oracle/product/grid/oms10g/bin >

[PROD] emrep:/u01/oracle/product/grid/oms10g/bin > emcli get_ca_info

Info about CA with ID: 1
CA is configured
DN: EMAILADDRESS=Enterprise.Manager@xxxu010.xxxxxxxx.com, CN=xxxu010.xxxxxxxx.com, OU=EnterpriseManager on xxxu010.xxxxxxxx.com, O=”EnterpriseManager on xxx010.xxxxxxxx.com “, L=EnterpriseManager on xxxu010.xxxxxxxx.com, ST=CA, C=US, DC=com
Serial# : 23751666985192037720
Valid From: Mon Oct 27 10:03:51 WST 2008
Valid Till: Fri Dec 31 00:00:00 WST 2010
Number of Agents registered with CA ID 1 is 41

[PROD] emrep:/u01/oracle/product/grid/oms10g/bin >

NOW Create a new self-signed Certificate Authority .

cd $ORACLE_HOME/bin – The OMS oracle home.

cd /u01/oracle/product/grid/oms10g/bin

./emctl secure createca

Enter Enterprise Manager Root (SYSMAN) Password : Enter sysman password in emrep database.

Successfully created CA with ID 2

emcli get_ca_info -details

[PROD] emrep:/u01/oracle/product/grid/oms10g/bin > emcli get_ca_info -details Info about CA with ID: 1 Valid From: Mon Oct 27 10:03:51 WST 2008
valid Till: Fri Dec 31 00:00:00 WST 2010 Number of Agents registered with CA ID 1 is 41 Info about CA with ID: 2
Valid From: Fri Dec 03 11:21:05 WST 2010
Valid Till: Mon Nov 30 11:21:03 WST 2020
There are no Agents registered with CA ID 2

[PROD] emrep:/u01/oracle/product/grid/oms10g/bin >

RESECURE AGENTS –

From OMS server itself – xxxxxU010 with ORACLE_HOME set to OMS HOME.

emcli secure_agents -agt_names=”xxxxxx.xxxxxxxx.com:3872;xxxx007.xxxxxxxx.com:3874” -username=oracle ( only those boxes where agent was installed using oracle login )
Enter Password:

Summary : Number of valid agents provided for secure : 2, Filtered : 0, Selected : 2 Number of agents provided for secure (input) : 2 Job “SECUREAGENTS JOB 2010-Dec-03 11:45:15” submitted for securing 2 agents
AGENT is secured and restarted at the same time –

Issue command to check status again –

emcli get_ca_info -details

[PROD] emrep:/u01/oracle/product/grid/oms10g/bin > emcli get_ca_info -details Info about CA with ID: 1 xxxx.xxxxxxxx.com:3872
Info about CA with ID: 2
CA is configured
DN: EMAILADDRESS=Enterprise.Manager@xxxxx.xxxxxxxx.com
Valid From: Fri Dec 03 11:21:05 WST 2010
Valid Till: Mon Nov 30 11:21:03 WST 2020
Number of Agents registered with CA ID 2 is 2
xxxx.xxxxxxxx.com:3874
xxxx.xxxxxxxx.com:3872

NOTICE THE 2 AGENTS WHICH WERE SECURED NOW APPEAR IN SECOND LIST …

Agents can also be secured independently on each agent server.

cd $AGENT ORACLE_HOME/bin

./emctl secure agent

After all agents are secured -secure the OMS – otherwise GRID CONTROL will not work properly.

cd $OMS ORACLE_HOME/bin – ./emctl secure oms

Posted in EM Grid Control | Tagged: | Leave a Comment »