Monday, October 31, 2011

How to check how much disk space is allocated/ in-use by an ASM instance?

Login to your +ASM instance (SYS AS SYSDBA) and execute the following query:
SQL> COL % FORMAT 99.0
SQL> SELECT name, free_mb, total_mb, free_mb/total_mb*100 "%" FROM v$asm_diskgroup;
NAME                              FREE_MB   TOTAL_MB     %
------------------------------ ---------- ---------- -----
DATA                               917104    1482145  61.9
RECOVER                             17387      17437  99.7
From Oracle 10g Release 2, one can also use the asmcmd command line utility:
ASMCMD> du
Used_MB      Mirror_used_MB
   1523                1523
ASMCMD> lsdg
State    Type    Rebal  Unbal  Sector  Block       AU  Total_MB  Free_MB  Req_mir_free_MB  Usable_file_MB  Offline_disks  Name
MOUNTED  EXTERN  N      N         512   4096  1048576     11264     9885                0            9885              0  DISKGROUP1/
MOUNTED  EXTERN  N      N         512   4096  1048576     10240     9906                0            9906              0  FLASH/

Sunday, October 30, 2011

Backup - DataGuard

Backup - DataGuard
•Startup commands
•To remove a delay from a standby
•Cancel managed recovery
•Register a missing log file
•If FAL doesn't work and it says the log is already registered
•Check which logs are missing
•Disable/Enable archive log destinations
•Turn on fal tracing on the primary db
•Stop the Data Guard broker
•Show the current instance role
•Logical standby apply stop/start
•See how up to date a physical standby is
•Display info about all log destinations
•Display log destinations options
•List any standby redo logs



Startup commands
 startup nomount
alter database mount standby database;
alter database recover managed standby database disconnect;



To remove a delay from a standby
 alter database recover managed standby database cancel;
alter database recover managed standby database nodelay disconnect;



Cancel managed recovery
 alter database recover managed standby database cancel;



Register a missing log file
 alter database register physical logfile '<fullpath/filename>';



If FAL doesn't work and it says the log is already registered
 alter database register or replace physical logfile '<fullpath/filename>';

If that doesn't work, try this...
 shutdown immediate
startup nomount
alter database mount standby database;
alter database recover automatic standby database;

wait for the recovery to finish - then cancel
 shutdown immediate
startup nomount
alter database mount standby database;
alter database recover managed standby database disconnect;



Check which logs are missing
 Run this on the standby...
select local.thread#
,      local.sequence# from
       (select thread#
       ,       sequence#
       from    v$archived_log
       where dest_id=1) local
where  local.sequence# not in
       (select sequence#
       from v$archived_log
       where dest_id=2 and
       thread# = local.thread#)
/



Disable/Enable archive log destinations
 alter system set log_archive_dest_state_2 = 'defer';
alter system set log_archive_dest_state_2 = 'enable';



Turn on fal tracing on the primary db
 alter system set LOG_ARCHIVE_TRACE = 128;



Stop the Data Guard broker
 alter system set dg_broker_start=false
/



Show the current instance role
 select database_role
from v$database
/



Logical standby apply stop/start
 Stop...
 alter database stop logical standby apply;

Start...
 alter database start logical standby apply;



See how up to date a physical standby is
 Run this on the primary
 set numwidth 15
select max(sequence#) current_seq
from v$log
/

Then run this on the standby
 set numwidth 15
select max(applied_seq#) last_seq
from v$archive_dest_status
/



Display info about all log destinations
 To be run on the primary
 set lines 100
set numwidth 15
column ID format 99
column "SRLs" format 99
column active format 99
col type format a4
select ds.dest_id id
, ad.status
, ds.database_mode db_mode
, ad.archiver type
, ds.recovery_mode
, ds.protection_mode
, ds.standby_logfile_count "SRLs"
, ds.standby_logfile_active active
, ds.archived_seq#
from v$archive_dest_status ds
, v$archive_dest  ad
where ds.dest_id = ad.dest_id
and ad.status != 'INACTIVE'
order by
 ds.dest_id
/



Display log destinations options
 To be run on the primary
 set numwidth 8 lines 100
column id format 99
select dest_id id
, archiver
, transmit_mode
, affirm
, async_blocks async
, net_timeout net_time
, delay_mins delay
, reopen_secs reopen
, register,binding
from v$archive_dest
order by
 dest_id
/



List any standby redo logs
 set lines 100 pages 999
col member format a70
select st.group#
, st.sequence#
, ceil(st.bytes / 1048576) mb
, lf.member
from v$standby_log st
, v$logfile lf
where st.group# = lf.group#
/




Andrew Barry

Saturday, October 22, 2011

The stapes to restart oracle database RAC with ASM

====Stop database, asm, listener, nodeapps finally crs===
1. STOP DATABASE
srvctl stop database -d DB_NAME
2. STOP ASM
srvctl stop asm -n NODE_NAME1
srvctl stop asm -n NODE_NAME2

3. STOP LISTENER
srvctl stop listener -n NODE_NAME1
srvctl stop listener -n NODE_NAME2

4. STOP NODEAPPS
srvctl stop nodeapps -n NODE_NAME1
srvctl stop nodeapps -n NODE_NAME2
5. STOP CRS
crsctl stop crs -- (on NODE_NAME1)
crsctl stop crs -- (on NODE_NAME2)

====Start crs, nodeapps, listner, asm and finally database===
1. START CRS
crsctl start crs -- (on NODE_NAME1)
crsctl start crs -- (on NODE_NAME2)
RESET to trace level 0
./crsctl debug log crs allcomp:0
2. START NODEAPPS
srvctl start nodeapps -n NODE_NAME1
srvctl start nodeapps -n NODE_NAME2

3. START LISTENER
srvctl start listener -n NODE_NAME1
srvctl start listener -n NODE_NAME2
4. STOP ASM
srvctl start asm -n NODE_NAME1
srvctl start asm -n NODE_NAME2
date
export SRVM_TRACE=y
env
srvctl start instance -d DB_NAME -i DB_NAME1

5. START DATABASE
srvctl start database -d DB_NAME

kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
Status of all instances and services

[p570db3][grid]/home/grid> srvctl status database -d bossmain
Instance bossmain1 is running on node p570db3
Instance bossmain2 is running on node p570db4
kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
 srvctl status nodeapps -n  p570db3
-n <node_name> option has been deprecated.
VIP p570db3-vip is enabled
VIP p570db3-vip is running on node: p570db3
Network is enabled
Network is running on node: p570db3
GSD is disabled
GSD is not running on node: p570db3
ONS is enabled
ONS daemon is running on node: p570db3
eONS is enabled
eONS daemon is not running on node: p570db3
kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
srvctl status asm -n p570db3
ASM is running on p570db3

Wednesday, October 19, 2011

Patch 9654983 - 11.2.0.1.2 Patch Set Update

Oracle® Database

Patch 9654983 - 11.2.0.1.2 Patch Set Update
Released: July 13, 2010
This document is accurate at the time of release. For any changes and additional information regarding PSU 11.2.0.1.2, see these related documents that are available at My Oracle Support (http://support.oracle.com/):
  • Note 854428.1 Patch Set Updates for Oracle Products
  • Note 1089071.1 Oracle Database Patch Set Update 11.2.0.1.2 Known Issues
This document includes the following sections:

1 Patch Information

Patch Set Update (PSU) patches are cumulative. That is, the content of all previous PSUs is included in the latest PSU patch.
PSU 11.2.0.1.2 includes the fixes listed in Section 5, "Bugs Fixed by This Patch".
Table 1 describes installation types and security content. For each installation type, it indicates the most recent PSU patch to include new security fixes that are pertinent to that installation type. If there are no security fixes to be applied to an installation type, then "None" is indicated. If a specific PSU is listed, then apply that or any later PSU patch to be current with security fixes.

Table 1 Installation Types and Security Content
Installation TypeLatest PSU with Security Fixes
Server homesPSU 11.2.0.1.2
Client-Only InstallationsNone
Instant Client InstallationsNone
(The Instant Client installation is not the same as the client-only Installation. For additional information about Instant Client installations, see Oracle Database Concepts.)

2 Patch Installation and Deinstallation

This section includes the following sections:

2.1 Platforms for PSU 11.2.0.1.2

For a list of platforms that are supported in this Patch Set Update, see My Oracle Support Note 1060989.1 Critical Patch Update July 2010 Patch Availability Document for Oracle Products.

2.2 OPatch Utility Information

You must use the OPatch utility version 11.2.0.1.0 or later to apply this patch. Oracle recommends that you use the latest released OPatch 11.2, which is available for download from My Oracle Support patch 6880880 by selecting the 11.2.0.0.0 release.
For information about OPatch documentation, including any known issues, see My Oracle Support Note 293369.1 OPatch documentation list.

2.3 Patch Installation

These instructions are for all Oracle Database installations.

2.3.1 Patch Pre-Installation Instructions

Before you install PSU 11.2.0.1.2, perform the following actions to check the environment and to detect and resolve any one-off patch conflicts.

2.3.1.1 Environments with ASM
If you are installing the PSU to an environment that has Automatic Storage Management (ASM), note the following:
  • For Linux x86 and Linux x86-64 platforms, install either (A) the bug fix for 8898852 and the Database PSU patch 9654983, or (B) the Grid Infrastructure PSU patch 9343627.
  • For all other platforms, no action is required. The fix for 8898852 was included in the base 11.2.0.1.0 release.

2.3.1.2 Environment Checks
  1. Ensure that the $PATH definition has the following executables: make, ar, ld, and nm.
    The location of these executables depends on your operating system. On many operating systems, they are located in /usr/ccs/bin, in which case you can set your PATH definition as follows:
    export PATH=$PATH:/usr/ccs/bin
    

2.3.1.3 One-off Patch Conflict Detection and Resolution
For an introduction to the PSU one-off patch concepts, see "Patch Set Updates Patch Conflict Resolution" in My Oracle Support Note 854428.1 Patch Set Updates for Oracle Products.
The fastest and easiest way to determine whether you have one-off patches in the Oracle home that conflict with the PSU, and to get the necessary conflict resolution patches, is to use the Patch Recommendations and Patch Plans features on the Patches & Updates tab in My Oracle Support. These features work in conjunction with the My Oracle Support Configuration Manager. Recorded training sessions on these features can be found in Note 603505.1.
However, if you are not using My Oracle Support Patch Plans, follow these steps:
  1. Determine whether any currently installed one-off patches conflict with the PSU patch as follows:
    unzip p9654983_11201_<platform>.zip
    opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir ./9654983
    
  2. The report will indicate the patches that conflict with PSU 9654983 and the patches for which PSU 9654983 is a superset.
    Note that Oracle proactively provides PSU 11.2.0.1.2 one-off patches for common conflicts.
  3. Use My Oracle Support Note 1061295.1 Patch Set Updates - One-off Patch Conflict Resolution to determine, for each conflicting patch, whether a conflict resolution patch is already available, and if you need to request a new conflict resolution patch or if the conflict may be ignored.
  4. When all the one-off patches that you have requested are available at My Oracle Support, proceed with Section 2.3.2, "Patch Installation Instructions".

2.3.2 Patch Installation Instructions

Follow these steps:
  1. If you are using a Data Guard Physical Standby database, you must first install this patch on the primary database before installing the patch on the physical standby database. It is not supported to install this patch on the physical standby database before installing the patch on the primary database. For more information, see My Oracle Support Note 278641.1.
  2. Do one of the following, depending on whether this is a RAC environment:
    • If this is a RAC environment, choose one of the patch installation methods provided by OPatch (rolling, all node, or minimum downtime), and shutdown instances and listeners as appropriate for the installation method selected.
      This PSU patch is rolling RAC installable. Refer to My Oracle Support Note 244241.1 Rolling Patch - OPatch Support for RAC.
    • If this is not a RAC environment, shut down all instances and listeners associated with the Oracle home that you are updating. For more information, see Oracle Database Administrator's Guide.
  3. Set your current directory to the directory where the patch is located and then run the OPatch utility by entering the following commands:
    unzip p9654983_11201_<platform>.zip
    cd 9654983
    opatch apply
    
  4. If there are errors, refer to Section 3, "Known Issues".

2.3.3 Patch Post-Installation Instructions

After installing the patch, perform the following actions:
  1. Apply conflict resolution patches as explained in Section 2.3.3.1.
  2. Load modified SQL files into the database, as explained in Section 2.3.3.2.

2.3.3.1 Applying Conflict Resolution Patches
Apply the patch conflict resolution one-off patches that were determined to be needed when you performed the steps in Section 2.3.1.3, "One-off Patch Conflict Detection and Resolution".

2.3.3.2 Loading Modified SQL Files into the Database
The following steps load modified SQL files into the database. For a RAC environment, perform these steps on only one node.
  1. For each database instance running on the Oracle home being patched, connect to the database using SQL*Plus. Connect as SYSDBA and run the catbundle.sql script as follows:
    cd $ORACLE_HOME/rdbms/admin
    sqlplus /nolog
    SQL> CONNECT / AS SYSDBA
    SQL> STARTUP
    SQL> @catbundle.sql psu apply
    SQL> QUIT
    
    The catbundle.sql execution is reflected in the dba_registry_history view by a row associated with bundle series PSU.
    For information about the catbundle.sql script, see My Oracle Support Note 605795.1 Introduction to Oracle Database catbundle.sql.
  2. Check the following log files in $ORACLE_HOME/cfgtoollogs/catbundle for any errors:
    catbundle_PSU_<database SID>_APPLY_<TIMESTAMP>.log
    catbundle_PSU_<database SID>_GENERATE_<TIMESTAMP>.log
    
    where TIMESTAMP is of the form YYYYMMMDD_HH_MM_SS. If there are errors, refer to Section 3, "Known Issues".

2.3.4 Patch Post-Installation Instructions for Databases Created or Upgraded after Installation of PSU 11.2.0.1.2 in the Oracle Home

These instructions are for a database that is created or upgraded after the installation of PSU 11.2.0.1.2.
You must execute the steps in Section 2.3.3.2, "Loading Modified SQL Files into the Database" for any new database only if it was created by any of the following methods:
  • Using DBCA (Database Configuration Assistant) to select a sample database (General, Data Warehouse, Transaction Processing)
  • Using a script that was created by DBCA that creates a database from a sample database

2.4 Patch Deinstallation

These instructions apply if you need to deinstall the patch.

2.4.1 Patch Deinstallation Instructions for a Non-RAC Environment

Follow these steps:
  1. Verify that an $ORACLE_HOME/rdbms/admin/catbundle_PSU_<database SID>_ROLLBACK.sql file exists for each database associated with this ORACLE_HOME. If this is not the case, you must execute the steps in Section 2.3.3.2, "Loading Modified SQL Files into the Database" against the database before deinstalling the PSU.
  2. Shut down all instances and listeners associated with the Oracle home that you are updating. For more information, see Oracle Database Administrator's Guide.
  3. Run the OPatch utility specifying the rollback argument as follows.
    opatch rollback -id 9654983
    
  4. If there are errors, refer to Section 3, "Known Issues".

2.4.2 Patch Post-Deinstallation Instructions for a Non-RAC Environment

Follow these steps:
  1. Start all database instances running from the Oracle home. (For more information, see Oracle Database Administrator's Guide.)
  2. For each database instance running out of the ORACLE_HOME, connect to the database using SQL*Plus as SYSDBA and run the rollback script as follows:
    cd $ORACLE_HOME/rdbms/admin
    sqlplus /nolog
    SQL> CONNECT / AS SYSDBA
    SQL> STARTUP
    SQL> @catbundle_PSU_<database SID>_ROLLBACK.sql
    SQL> QUIT
    
    In a RAC environment, the name of the rollback script will have the format catbundle_PSU_<database SID PREFIX>_ROLLBACK.sql.
  3. Check the log file for any errors. The log file is found in $ORACLE_HOME/cfgtoollogs/catbundle and is named catbundle_PSU_<database SID>_ROLLBACK_<TIMESTAMP>.log where TIMESTAMP is of the form YYYYMMMDD_HH_MM_SS. If there are errors, refer to Section 3, "Known Issues".

2.4.3 Patch Deinstallation Instructions for a RAC Environment

Follow these steps for each node in the cluster, one node at a time:
  1. Shut down the instance on the node.
  2. Run the OPatch utility specifying the rollback argument as follows.
    opatch rollback -id 9654983
    
    If there are errors, refer to Section 3, "Known Issues".
  3. Start the instance on the node as follows:
    srvctl start instance
    

2.4.4 Patch Post-Deinstallation Instructions for a RAC Environment

Follow the instructions listed in Section Section 2.4.2, "Patch Post-Deinstallation Instructions for a Non-RAC Environment" only on the node for which the steps in Section 2.3.3.2, "Loading Modified SQL Files into the Database" were executed during the patch application.
All other instances can be started and accessed as usual while you are executing the deinstallation steps.

3 Known Issues

For information about OPatch issues, see My Oracle Support Note 293369.1 OPatch documentation list.
For issues documented after the release of this PSU, see My Oracle Support Note 1089071.1 Oracle Database Patch Set Update 11.2.0.1.2 Known Issues.
Other known issues are as follows.
Issue 1
The following ignorable errors may be encountered while running the catbundle.sql script or its rollback script:
ORA-29809: cannot drop an operator with dependent objects
ORA-29931: specified association does not exist
ORA-29830: operator does not exist
ORA-00942: table or view does not exist
ORA-00955: name is already used by an existing object
ORA-01430: column being added already exists in table
ORA-01432: public synonym to be dropped does not exist
ORA-01434: private synonym to be dropped does not exist
ORA-01435: user does not exist
ORA-01917: user or role 'XDB' does not exist
ORA-01920: user name '<user-name>' conflicts with another user or role name
ORA-01921: role name '<role name>' conflicts with another user or role name
ORA-01952: system privileges not granted to 'WKSYS'
ORA-02303: cannot drop or replace a type with type or table dependents
ORA-02443: Cannot drop constraint - nonexistent constraint
ORA-04043: object <object-name> does not exist
ORA-29832: cannot drop or replace an indextype with dependent indexes
ORA-29844: duplicate operator name specified 
ORA-14452: attempt to create, alter or drop an index on temporary table already in use
ORA-06512: at line <line number>. If this error follow any of above errors, then can be safely ignored.
ORA-01927: cannot REVOKE privileges you did not grant

4 References

The following documents are references for this patch.
Note 293369.1 OPatch documentation list
Note 360870.1 Impact of Java Security Vulnerabilities on Oracle Products
Note 468959.1 Enterprise Manager Grid Control Known Issues
Note 9352237.8 Bug 9352237 - 11.2.0.1.1 Patch Set Update (PSU)

5 Bugs Fixed by This Patch

This patch includes the following bug fixes.

5.1 CPU Molecules

CPU molecules in PSU 11.2.0.1.2:
PSU 11.2.0.1.2 contains the following new CPU molecules:
9676419 - DB-11.2.0.1-MOLECULE-004-CPUJUL2010
9676420 - DB-11.2.0.1-MOLECULE-005-CPUJUL2010

5.2 Bug Fixes

PSU 11.2.0.1.2 contains the following new fixes:

Automatic Storage Management
8755082 - ORA-00600: [KCFIS_TRANSLATE4:VOLUME LOOKUP], [2], [WRONG DEVICE NAME], [], [], [
8890026 - ASM PARTNERING CREATES IMBALANCED PARTNERSHIPS
9170608 - STBH:DD BLOCKS PINNED FOR QUERIES THAT DO NOT REQUEST USED SPACE
9363145 - STBH:DB INSTANCES TERMINATED BY ASMB DUE TO ORA-00600 [KFDSKALLOC0]

Buffer Cache
8330783 - HANGING DB WITH "CACHE BUFFER CHAINS" AND "BUFFER DEADLOCK" WAITS DURING INSERT
8822531 - TAKING AWR SNAP HANGS

Data Guard Broker
8918433 - UNPERSISTED FSFO STATE BITS CAN GET PERSISTED
9363384 - PHYSICAL STANDBY SERVICES NOT STARTED AFTER CONVERT FROM SNAPSHOT
9467635 - BROKER'S METADATA FILE UPGRADE TO 11.2 IS BROKEN
9467727 - GETSTATUS DOC YIELDS INCORRECT RESULT IF DBRESOURCE_ID PROP VALUE IS USED

Data Guard Logical
8774868 - LGSBFSFO: ORA-600 [3020], [3], [138] RAISED IN RECOVERY SLAVE
8822832 - V$ARCHIVE_DEST_STATUS HAS INCORRECT VALUE FOR APPLIED_SEQ#

DataGuard Redo Transport
8872096 - ARCHIVING FORCED DURING CLOSE WHEN NO STANDBY IS PRESENT
9399090 - STBH: CONSTANT/HIGH FREQUENT LOG SWITCHES ON BEEHIVE DATABASE IN THE LAST 3 DAYS

Shared Cursors
8865718 - RECURSIVE CURSORS CONTAINING "AS OF SNAPSHOT" CLAUSE ARE NOT SHARED
8981059 - HIGH VERSION COUNT:BIND_MISMATCH,USER_BIND_PEEK_MISMATCH,OPTIMIZER_MODE_MISMATCH
9010222 - APPS ST 11G ORA-00600 [KKSFBC-REPARSE-INFINITE-LOOP]
9067282 - TB:SH:ORA-00600:[KKSFBC-WRONG-KKSCSFLGS] WHILE RUNNING TPC-H

DML Drivers
9255542 - ARRAY INSERT TO PARTITIONED TABLE LOOSES ROWS DUE TO CONCURRENT DDL (ORA-14403)
9488887 - FORIEGN KEY VIOLATION WITH ARRAY-INSERT AND ONLINE IDX REBUILD AFTER BUG-9255542

Flashback Database
8834425 - ORA-240 IN RVWR PROCESS CAUSING 5MIN TRANSACTIONAL HANG

PLSQL
9210925 - AFTER MANUAL UPGRADE TO 11.1.0.7 PL/SQL CALLS INCORRECT FUNCTION

Automatic Memory Management
8505803 - PRE_PAGE_SGA RESULTS IN EXCESSIVE PAGE TABLE SIZE WHEN USING MEMORY_TARGET [AMM]

Partitioning
9165206 - PARTITIONING ORA-600 [KKPOLLS1] / [KKDOILSF1] - DURING PARTITION MAINTANANCE

Real Application Cluster
8875671 - LX64: ORA-600 ARGS [KJPNP_CHK:!MASTER_READY],
9093300 - LOTS OF REPEATED KJXOCDR: DROP DUPLICATE OPEN MESSAGE IN LMD TRACE

Row Access Method
8544696 - TABLE GROWTH - BLOCKS ARE NOT REUSED

Streams
8650719 - DOWNSTREAM CAPTURE ABORTS WITH ORA-26766

Secure Files
8856478 - RAM SECUREFILE PERF DEGRADATION WITH SF COMPRESSION ON SMALL LOBS DURING ATB MOVE
9272086 - STBH: DATA PUMP WRITER SEEMS TO BE WAITING ON WAIT FOR UNREAD MESSAGE ON BROADCA

DB Recovery
8909984 - APPSST GSI 11G: GAPS IN AWR SNAPSHOTS
9068088 - MEDIA RECOVERY WAS HUNG ON STANDBY
9145541 - ORA-600 [25027] / ORA-600 [4097] FOR ACTIVE TX IN A PLUGGED TABLESPACE
9167285 - PKT-BUGOLTP: ORA-07445: [KCRALC()+87]

Space Management
7519406 - 'J000' TRACE FILE REGARDING GATHER_STATS_JOB INTERMITTENTLY SINCE 10.2.0.4
8815639 - [11GR2-LNX-090813] MULTIPLE INSERT CAUSE DATA ALLOCATION ABOVE HHWM
9216806 - HIGH "ENQ: TS - CONTENTION" FOR TEMPORARY SEGMENT WHILE SQLLDR DIRECT PATH LOAD
9242411 - STRESS-BIGBH: LOTS OF OR-3113S IN BIGBH STRESS TEST
9461782 - ORA-7445 [KTSLF_SUMFSG()+54] [SIGSEGV] AND KTSLFSUM_CFS ON CALL STACK

Compression
9011088 - [11GR2]ADDING COLUMN TO COMPRESSED TABLE, DATA LOSS OCCURED.
9275072 - APPSST GSI 11G : BUFFER BUSY WAITS INSERTING INTO TABLES
9341448 - APPSST GSI 11G : BUFFER BUSY WAITS AND LATCH: CACHE BUFFERS WAITS WHEN INSERTING
9637033 - ORA-07445[KDR9IR2RST0] INSERT AS SELECT IN A COMPRESSED TABLE WITH > 255 COLUMNS

SQL Execution
8664189 - ORA-00600 [KDISS_UNCOMPRESS: BUFFER LENGTH]
9119194 - PSRC: DISTRIBUTED QUERY SLOWER IN 10.2.0.4 COMPARED TO 10.2.0.3

Transaction Management
8268775 - PERF: HIGH US ENQUEUE CONTENTION DURING A LOGIN STORM OR SESSION FAILOVER
8803762 - ORA-00600 [KDSGRP1] BLOCK CORRUPTION ON 11G DATABASE UPGRADE

Memory Management
8431487 - INSTANCE CRASH ORA-07445 [KGGHSTFEL()+192] ORA-07445[KGGHSTMAP()+241]

Message
9713537 - ENHANCE CAUSE/ACTION FIELDS OF THE INTERNAL ERROR ORA-00600
9714832 - ENHANCE CAUSE/ACTION FIELDS OF THE INTERNAL ERROR ORA-07445

6 Documentation Accessibility

Our goal is to make Oracle products, services, and supporting documentation accessible to all users, including users that are disabled. To that end, our documentation includes features that make information available to users of assistive technology. This documentation is available in HTML format, and contains markup to facilitate access by the disabled community. Accessibility standards will continue to evolve over time, and Oracle is actively engaged with other market-leading technology vendors to address technical obstacles so that our documentation can be accessible to all of our customers. For more information, visit the Oracle Accessibility Program Web site at http://www.oracle.com/accessibility/.

Accessibility of Code Examples in Documentation
Screen readers may not always correctly read the code examples in this document. The conventions for writing code require that closing braces should appear on an otherwise empty line; however, some screen readers may not always read a line of text that consists solely of a bracket or brace.

Accessibility of Links to External Web Sites in Documentation
This documentation may contain links to Web sites of other companies or organizations that Oracle does not own or control. Oracle neither evaluates nor makes any representations regarding the accessibility of these Web sites.

Access to Oracle Support
Oracle customers have access to electronic support through My Oracle Support. For information, visit http://www.oracle.com/support/contact.html or visit http://www.oracle.com/accessibility/support.html if you are hearing impaired.


Patch 9209238 - 11.2.0.1.1 Patch Set Update Release 11.2.0.1.1 for UNIX
Copyright © 2006, 2010, Oracle and/or its affiliates. All rights reserved.
This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited.
The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing.
If this software or related documentation is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, the following notice is applicable:
U.S. GOVERNMENT RIGHTS Programs, software, databases, and related documentation and technical data delivered to U.S. Government customers are "commercial computer software" or "commercial technical data" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, the use, duplication, disclosure, modification, and adaptation shall be subject to the restrictions and license terms set forth in the applicable Government contract, and, to the extent applicable by the terms of the Government contract, the additional rights set forth in FAR 52.227-19, Commercial Computer Software License (December 2007). Oracle USA, Inc., 500 Oracle Parkway, Redwood City, CA 94065.
This software is developed for general use in a variety of information management applications. It is not developed or intended for use in any inherently dangerous applications, including applications which may create a risk of personal injury. If you use this software in dangerous applications, then you shall be responsible to take all appropriate fail-safe, backup, redundancy, and other measures to ensure the safe use of this software. Oracle Corporation and its affiliates disclaim any liability for any damages caused by use of this software in dangerous applications.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.
This software and documentation may provide access to or information on content, products, and services from third parties. Oracle Corporation and its affiliates are not responsible for and expressly disclaim all warranties of any kind with respect to third-party content, products, and services. Oracle Corporation and its affiliates will not be responsible for any loss, costs, or damages incurred due to your access to or use of third-party content, products, or services.

Wednesday, October 12, 2011

ORA-00054: resource busy and acquire with NOWAIT specified or timeout expired

DDL with the WAIT option in 11g -DDL_LOCK_TIMEOUT

Whenever you perform any DDL operation on a table, oracle try to lock the table exclusively. In oracle version 10g and earlier, whenever you issue DDL, oracle try to lock the table exclusively with NOWAIT option and if it fails then immediately "ORA-00054 resource busy and acquire with NOWAIT specified" error returned. In fact, in oracle 10g we didn't have any other alternatives. So we had to wait until resource is free and in fact in production database you might need hours to complete your DDL jobs and you might need to try it frequently to test when resource become free.

A discussion about ORA-54 error with an example is demonstrated in the topic ORA-00054: resource busy and acquire with NOWAIT specified.

Oracle database 11g includes the DDL_LOCK_TIMEOUT parameter, which you can set using the ALTER SYSTEM and ALTER SESSION commands. Now you have the opportunity not to issue DDL frequently and query itself can wait a specified time and if it find resource free within this time DDL operation will be completed.

The parameter DDL_LOCK_TIMEOUT specifies a time limit for how long DDL statements will wait in a DML lock queue.
- The default value is zero which indicates a status of NOWAIT.
- The maximum value is 1,000,000 seconds which indicates the DDL statement will wait forever to acquire a DML lock.
- If you specify time in the DDL_LOCK_TIMEOUT parameter and if a lock is not acquired before the timeout period expires, then an error is returned.

To demonstrate this scenario let's create a simple example in oracle database 11g.

1)Create table named test_wait, insert a row and leave the session alone.

SQL> create table test_wait(col1 number);

Table created.

SQL> insert into test_wait values(1);

1 row created.

2)Now from another session do DDL operation.
Note that you may be succeed while adding column to the table in this case. Here in another session I am practising DROP DDL command.

SQL> drop table test_wait;
drop table test_wait
*
ERROR at line 1:
ORA-00054: resource busy and acquire with NOWAIT specified or timeout expired

SQL> show parameter ddl_lock_

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
ddl_lock_timeout integer 0

It failed because in the above you see ddl_lock_timeout is set to 0 which means NOWAIT and so if query see someone lock the row error returned immediately.

Now we change to parameter to 100. Now query will wait for 100 seconds in order to see whenever resource become free.

SQL> alter session set ddl_lock_timeout=100;
or
SQL>alter system set ddl_lock_timeout = 100 ;

Session altered.

Now in the first session issue commit.
SQL> commit;

And in the second session try to drop the table and you see drop become successful if you do commit within 100 seconds.
SQL> drop table test_wait;

Table dropped.

However if you did not do commit within 100 seconds in the first session then after 100 seconds in the second session DROP command would fail with "ORA-00054: resource busy and acquire with NOWAIT specified or timeout expired".




by Oracle in World

Tuesday, October 11, 2011

Create script to give grant to user

SELECT 'GRANT SELECT ON schema name.'|| table_name||' to user name ;' FROM dba_tables WHERE owner = 'owner name' ;

SELECT 'GRANT SELECT ON schema name.'|| view_name||' to user name ;' FROM dba_views WHERE owner = 'owner name' ;

SELECT 'grant EXECUTE ON schema name.'||object_name||' to user name ;'
FROM dba_objects WHERE owner='owner name' and OBJECT_TYPE in ('FUNCTION' ,'PROCEDURE') ;

To Generate Analyzed Script for tables and index

select 'execute dbms_stats.gather_table_stats('||''''||owner|| ''','''||''||table_name||''''|| ',estimate_percent=>dbms_stats.auto_sample_size,cascade => TRUE);'
from dba_tables
where OWNER not in ('SYS', 'SYSTEM')
group by owner, table_name
having sum(decode(nvl(NUM_ROWS,9999), 9999,1,0)) > 0


Select Distinct 'execute dbms_stats.gather_index_stats('||''''||owner|| ''','''||''||index_name||''''|| ');'
from dba_indexes
where OWNER not in ('SYS', 'SYSTEM')
group by owner, index_name
having sum(decode(nvl(NUM_ROWS,9999), 9999,1,0)) > 0;


Select Distinct 'execute dbms_stats.gather_table_stats('||''''||table_owner|| ''','''||''||table_name||''''|| ',estimate_percent=>dbms_stats.auto_sample_size,cascade => TRUE);'
from dba_tab_partitions
where table_OWNER not in ('SYS', 'SYSTEM')
group by table_owner, table_name
having sum(decode(nvl(NUM_ROWS,9999), 9999,1,0)) > 0;

Installing Grid Control (10.2.0.5) on RHEL 5 with 11g Database Repository


Oracle DBA Tips Corner
Return to the Oracle DBA Tips Corner.


________________________________________
Installing Grid Control (10.2.0.5) on RHEL 5 with 11g Database Repository
by Jeff Hunter, Sr. Database Administrator
________________________________________

________________________________________
Overview
This article is a comprehensive guide for installing Oracle Enterprise Manager 10g Grid Control Release 5 (10.2.0.5) on the Red Hat Enterprise Linux 5 operating system.
Oracle Enterprise Manager 10g Grid Control consists of three major software components, all of which can exist on one single machine or multiple machines:
• Oracle Management Service
• Oracle Database (the OEM repository)
• Oracle Management Agent
The Grid Control Console is an additional software component which is a browser-based central console through which administrators can perform all monitoring, administration, and configuration tasks for the enterprise.
For the purpose of this article, all components of Grid Control will be installed on a single server; namely oemprod.idevelopment.info. The server oemprod will already have an existing Oracle Database 11g Release 1 Enterprise Edition software installation (11.1.0.7.0) and a new 11g database created named emrep which will be used to store the Oracle Management Repository.
For a comprehensive guide on how to install Oracle Database 11g Release 1 on the Red Hat Enterprise Linux 5 platform, please see my article "Installing Oracle Database 11g Release 1 on Linux - (RHEL 5)".
Before creating the Oracle 11g database to host the Oracle Management Repository, please see the section "Prepare the Existing Oracle 11g Database for the Grid Control Install" to ensure a successful Grid Control installation.

Installing Enterprise Manager 10g Grid Control Release 5 is a two step process.
1. The first step is to install the full release of Enterprise Manager 10g Grid Control Release 2 (sometimes called the base version). A full release refers to the first, complete Enterprise Manager 10g Grid Control version which for Linux x86 is 10.2.0.1. (The full release for Linux x86_64 is 10.2.0.3) A full release comprises all three components that form Grid Control, mainly Oracle Management Service, Oracle Management Repository, and Oracle Management Agent.
2. The second step in the installation process is to patch the base version by applying the Enterprise Manager Release 5 patch set (10.2.0.5).
The following is a conceptual view of what the configuration will look like by the end of this document:


Install Software-Only Installation Method
This article documents the steps used to install Oracle Enterprise Manager 10g Grid Control Release 5 on the Red Hat Enterprise Linux 5 platform (RHEL 5). When searching Oracle's certification matrix, you will see that Enterprise Manager 10g Grid Control Release 2 is not supported on the RHEL 5 platform. This, however, is the full release install (or base release install) which is the first step in the installation process and is required in order to apply the Enterprise Manager 10g Grid Control Release 5 patch set to. At first glance, this would seem a bit confusing. How do you perform the first step of the installation process which is to install Enterprise Manager 10g Grid Control Release 2 when it is not supported on the RHEL 5 operating system? The solution is quite simple. We will be using the "Installing Software-Only and Configuring Later" (Silent Mode) method which allows us to install only the software binaries for Enterprise Manager 10g Grid Control Release 2, that is, without any configuration to the installation.
The "Installing Software-Only and Configuring Later" installation method is supported only by Enterprise Manager 10g Grid Control Release 4 (10.2.0.4) or higher. This type of installation saves both time and effort, and is best suited when you are installing Enterprise Manager 10g Grid Control Release 4 (10.2.0.4) or higher for the first time in your environment.
DO NOT use this method to patch or upgrade any existing, previous release of Grid Control. For example, if you already have Enterprise Manager 10g Grid Control Release 3 for Linux x86 (10.2.0.3), then do NOT use this method to patch or upgrade to a higher release.

After the software-only installation of the Enterprise Manager 10g Grid Control Release 2 binaries, we immediately then apply the Enterprise Manager 10g Grid Control Release 5 patch set which again will use the "Installing Software-Only and Configuring Later" (Silent Mode) method. Both software installations will be performed using the Oracle Universal Installation Silent Mode (non-GUI) option. After successfully performing the Enterprise Manager 10g Grid Control Release 2 software-only installation and applying the Enterprise Manager 10g Grid Control Release 5 patch set using the software-only method, the final step will be to "Configure" the Grid Control environment using the Perl script ConfigureGC.pl. The ConfigureGC.pl Perl script is included as part of the Oracle Management Service (OMS) install.
Red Hat Enterprise Linux 5, along with the other operating system's listed below, are considered newly supported platforms by Enterprise Manager 10g Grid Control Release 5 (10.2.0.5).
• Oracle Enterprise Linux (OEL) 5.0, 5.1, 5.2
• Red Hat Enterprise Linux 5.0, 5.1, 5.2
• SUSE Linux Enterprise 10
• HP- UX Itanium 11.31
• AIX 6.1
• HP-UX PA-RISC 11.31


Oracle Management Repository
Oracle Enterprise Manager 10g Grid Control requires an Oracle database to store the Oracle Management Repository. The Oracle Management Repository consists of objects such as RDBMS jobs, packages, procedures, views, and two tablespaces in an Oracle Database that contain all available information about administrators, targets, and applications managed within Enterprise Manager.
The Management Service component uploads the monitoring data it receives from the Management Agents to the Management Repository. The Management Repository then organizes the data so that it can be retrieved by the Management Service and displayed in the Grid Control console. Because data is stored in the Management Repository, it can be shared between any number of administrators accessing the Grid Control console.
During the installation of Enterprise Manager, the OUI provides two pre-defined methods for creating the Management Repository.
Installing Enterprise Manager 10g Grid Control Using a New Database
Installs Enterprise Manager 10g Grid Control onto the host machine, creating the Management Repository on a new Enterprise Edition Oracle 10g Database Release 1 (10.1.0.4).
Installing Enterprise Manager 10g Grid Control Using an Existing Database
Installs Enterprise Manager 10g Grid Control onto the host machine, creating the Management Repository on a qualified existing database, which may be local to the host or remote.
For the purpose of this article, I will be installing Enterprise Manager 10g Grid Control using an existing database. The Oracle Database 11g Release 1 Enterprise Edition software has already been installed on the Grid Server machine and an Oracle 11g database named emrep has been created which will be used for the Oracle Management Repository.
Note that the database you use for the Oracle Management Repository must be Enterprise Edition and have fine-grained access control enabled. Additionally, specific initialization parameters must be set on the existing database to ensure a successful installation.
If the existing database is on the same host where OMS is installed (as will be the case in this article), the database gets added to the All Targets page of the Grid Control console, but you will have to provide configuration details to enable monitoring of that database. To do so (after installing and configuring Grid Control), log in to Enterprise Manager Grid Control, click Targets and then click All Targets. From the list, select the database instance and click Configure. In the "Configure Database Instance: Properties Page", provide the details.
Note that a default "Enterprise Edition" database installation is NOT sufficient for use as a Grid Control repository!
Also, the existing Oracle database must be free of any prior repository contents, whether for Database Control or Grid Control.

I will be covering a full list of requirements in the section "Prepare the Existing Oracle 11g Database for the Grid Control Install" which describes the tasks necessary to prepare the existing Oracle 11g database to host the Oracle Management Repository.

Oracle Homes
The Oracle Universal Installer (OUI) provides for a seamless installation experience by performing multiple Oracle home installations for the above mentioned components depending on the type of installation that is selected. A typical Oracle Enterprise Manager installation will create a separate Oracle home for all three components. The Oracle homes that are created as sub-directories by the installer will be placed under the Parent Directory that you specify during installation.
This parent directory is also called the Oracle Home Directory or Base directory. The default value used by the OUI is $ORACLE_BASE/OracleHomes.
Although not required, I will be setting the $ORACLE_BASE environment variable in the .bash_profile login script for the oracle user account which will get recognized by the OUI.

This article will specify the Parent Directory as /u01/app/oracle/product. Keep in mind that this article will make use of an existing Oracle 11g database which is already installed on the Grid Control server. Therefore, the OUI will only create directories for the "Oracle Management Service" and the "Oracle Management Agent". The Oracle home directory used by the existing Oracle Database 11g Release 1 software is /u01/app/oracle/product/11.1.0/db_1. The corresponding Oracle home directories for the two software components are listed in the table below:
Enterprise Manager Oracle Homes
Oracle Management Service /u01/app/oracle/product/oms10g
Oracle Management Agent /u01/app/oracle/product/agent10g

Enterprise Manager Configuration
The following table describes the various installation and configuration parameters that will be used in this article.
Enterprise Manager Configuration
Machine Name oemprod.idevelopment.info
Memory 2GB
IP Address 192.168.1.125
Operating System CentOS Release 5.3 - (32-bit)
OEM - Base Release Enterprise Manager 10g Grid Control R2 (12.2.0.1) for Linux
OEM - Patch Release Enterprise Manager 10g Grid Control R5 (12.2.0.5) for Linux
OEM - Oracle Home Parent Directory /u01/app/oracle/product
Oracle Home - Management Service /u01/app/oracle/product/oms10g
Oracle Home - Management Agent /u01/app/oracle/product/agent10g
Oracle Home - Management Repository /u01/app/oracle/product/11.1.0/db_1
Management Repository Install Method Using an Existing Database
Existing Repository Database Version 11.1.0.7.0 - Enterprise Edition
Existing Repository Database Name emrep
Existing Repository Database Files /u02/oradata/EMREP/datafile/
All O/S and DB Passwords are the Same emgc10g
oraInventory Location Existing /etc/oraInst.loc points to /u01/app/oraInventory
OMS Security OMS will be Unlocked After the Install


Further Reading
Grid Control is a large, bloated, and overly complex web application which, needless to say, is riddled with a considerable number of bugs. Consequently, this article should not be considered a substitute for completely reading and understanding the official installation guide and release notes from Oracle (although, in many cases, the documentation is as poorly written as the OEM application itself). Pay considerable attention to the prerequisites for your environment before attempting the install. The following links can be used to download the official installation guides and release notes for Oracle Enterprise Manager 10g:
Enterprise Manager 10g Grid Control Release 2 (10.2.0.1)
Enterprise Manager Grid Control Quick Installation Guide for Linux x86
Enterprise Manager Release Notes for Linux x86
Enterprise Manager 10g Grid Control Release 5 (10.2.0.5)
Enterprise Manager Grid Control Release Notes for Linux and Microsoft Windows
Oracle Management Agent
10g R2 Management Agent Deployment Best Practices

________________________________________
Pre-Installation Requirements
This section provides the pre-installation requirements for installing Oracle Enterprise Manager 10g Grid Control Release 2 on Red Hat Enterprise Linux 5.
Required Linux Packages
The Enterprise Manager server must be running the following (or later) package versions for Red Hat Enterprise Linux 5.
32-bit (x86) Installations
rpm –ivh compat-libstdc++* libstdc++devel* openmotif* pdksh*
rpm –ivh gnome-libs* compat-db* xscreensaver*
make-3.79
binutils-2.14
gcc-3.2
glibc-devel-2.5-18
libXp-1.0.0-8.1

64-bit (x86_64) Installations
make-3.79
binutils-2.14
gcc-3.2
glibc-devel-2.5
glibc-devel-2.5-18 (32 bit)
libXp-1.0.0-8.1
Note that there are packages where both the 64-bit and 32-bit RPMs must be installed. Fortunately, both versions are provided on the 64-bit Red Hat Enterprise Linux 5 installation media.

Ensure that libXp.rpm is installed. Note that this package is not installed by default with the default RPM packages for Red Hat Enterprise Linux 5 and Oracle Enterprise Linux 5 platforms. So, you must install it manually. For Red Hat Enterprise Linux 4, this file is provided by the package xorg-x11-deprecated-libs, which is installed with the default package installation, however, this is not the case for Red Hat Enterprise Linux 5 and Oracle Enterprise Linux 5.
To verify the libXp.rpm package is installed (which in case, mine are), run the following command:
# rpm -qa --queryformat "%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n"| grep libXp
libXpm-3.5.5-3 (i386)
libXp-devel-1.0.0-8.1.el5 (i386)
libXpm-devel-3.5.5-3 (i386)
libXp-1.0.0-8.1.el5 (i386)
If the libXp.rpm package is not installed, run the following command:
# rpm -ivh libXp..i386.rpm
You will find /usr/lib/libXp.so.6 when you install the /Server/libXp-1.0.0-8.1.el5.i386.rpm package from the Red Hat Enterprise Linux 5 DVD.


Set Required Kernel Parameters
The system must have at least the following recommended kernel parameters. This list is the same for both the Linux x86 and Linux x86_64 architecture:
Parameter Recommended Value Default Value How to Check
shmmax 536870912 33554432 cat /proc/sys/kernel/shmmax
shmmni 4096 4096 cat /proc/sys/kernel/shmmni
shmall 2097152 2097152 cat /proc/sys/kernel/shmall
shmmin 1 1 ipcs -lm | grep "min seg size"

semmsl 250 250 cat /proc/sys/kernel/sem | awk '{print $1}'
semmns 32000 32000 cat /proc/sys/kernel/sem | awk '{print $2}'
semopm 100 32 cat /proc/sys/kernel/sem | awk '{print $3}'
semmni 128 128 cat /proc/sys/kernel/sem | awk '{print $4}'

file-max 65536 102696 cat /proc/sys/fs/file-max

ip_local_port_range 1024 65000 32768 61000 cat /proc/sys/net/ipv4/ip_local_port_range

rmem_default 262144 109568 cat /proc/sys/net/core/rmem_default
rmem_max 262144 131071 cat /proc/sys/net/core/rmem_max
wmem_default 262144 109568 cat /proc/sys/net/core/wmem_default
wmem_max 262144 131071 cat /proc/sys/net/core/wmem_max
If the current value for any kernel parameter is higher than the value listed in this table, do not change the value of that parameter.

For this article, I identified and provide the values that will need to be added to the /etc/sysctl.conf file which is used during the boot process. Note that a few of the values used in my sample /etc/sysctl.conf file (below) are higher than the minimum required settings documented for Oracle Enterprise Manager Grid Control Release 5. These higher values were set to support the Oracle 11g database hosted on the Grid Control server and will work just fine for Enterprise Manager.
Prior to adding the following kernel parameter values to the /etc/sysctl.conf file, you will need to remove the two shared memory kernel parameters (kernel.shmmax and kernel.shmall) put in by Red Hat Enterprise Linux 5.



After adding the above lines to the /etc/sysctl.conf file, they persist each time the system reboots. If you would like to make these kernel parameter value changes to the current system without having to first reboot, enter the following command:
[root@oemprod ~]# /sbin/sysctl -p
net.ipv4.ip_forward = 0
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 0
kernel.core_uses_pid = 1
net.ipv4.tcp_syncookies = 1
kernel.msgmnb = 65536
kernel.msgmax = 65536
kernel.shmmax = 536870912
kernel.shmmni = 4096
kernel.shmall = 2097152
kernel.sem = 250 32000 100 128
fs.file-max = 6553600
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 4194304
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 262144
fs.aio-max-nr = 1048576




Review the output from the above command and verify that the values are correct. If the values are not correct, edit the /etc/sysctl.conf to correct the values, re-run the sysctl -p command and verify the values.

Prepare Red Hat Enterprise Linux 5 Environment
Oracle Enterprise Manager 10g Grid Control Release 2 is not directly supported on the Red Hat Enterprise Linux 5 platform. As mentioned in the Overview section of this article, we will be using the "Installing Software-Only and Configuring Later" (Silent Mode) method which allows us to install only the software binaries for Enterprise Manager 10g Grid Control Release 2, that is, without any configuration to the installation. After the software-only installation of the Enterprise Manager 10g Grid Control Release 2 binaries, we immediately then apply the Enterprise Manager 10g Grid Control Release 5 patch set which again will use the "Installing Software-Only and Configuring Later" (Silent Mode) method. Both software installations will be performed using the Oracle Universal Installation Silent Mode option (non-GUI).
To ensure the Enterprise Manager 10g Grid Control Release 2 software can be successfully installed on the RHEL 5 platform, execute the following commands as root:


ln -s /usr/lib/libgdbm.so.2.0.0 /usr/lib/libdb.so.2
chmod 755 /usr/lib/libgdbm.so.2.0.0
chmod 755 /usr/lib/libdb.so.2

Host Name Requirement
The host name must be a valid host name. For example, oemprod.idevelopment.info or oemprod. It cannot, however, be an IP address. At the same time, it cannot be localhost.localdomain as strings used in the /etc/hosts file. At the time of invoking the installer, you can pass "ORACLE_HOSTNAME= -local" as an argument if necessary.

Create the Oracle User Account
This article assumes the Oracle Database 11g Release 1 Enterprise Edition software has already been installed on the Enterprise Manager server and as such, the UNIX groups (oinstall, dba, and oper) and oracle user account have already been created.
Although creating the UNIX groups and UNIX account may be option in this section, it is still highly recommended that you use the .bash_profile login script I have for the oracle user account.

Creating the UNIX groups and UNIX account described in this section is only required if no previous Oracle software product has been installed on the Enterprise Manager server. If Enterprise Manager will be the first Oracle software product installed on this server, then this section provides the commands necessary to create the required UNIX groups and UNIX user account required for installing Grid Control. This section can also be used as a reference for how my environment is configured.
If the UNIX groups (oinstall, dba, and oper) and user (oracle) are not already created, use the following commands to create them for the Enterprise Manager installation.


[root@oemprod ~]# groupadd -g 501 oinstall
[root@oemprod ~]# groupadd -g 502 dba
[root@oemprod ~]# groupadd -g 503 oper

[root@oemprod ~]# useradd -m -u 501 -g oinstall -G dba -d /home/oracle -s /bin/bash -c "Oracle Software Owner" oracle


[root@oemprod ~]# id oracle
uid=501(oracle) gid=501(oinstall) groups=501(oinstall),502(dba)
Set the password for the oracle account:


[root@oemprod ~]# passwd oracle
Changing password for user oracle.
New UNIX password: xxxxxxxxxxx
Retype new UNIX password: xxxxxxxxxxx
passwd: all authentication tokens updated successfully.
Create a new directory that will be used to store the Enterprise Manager software. When configuring the oracle user's environment (later in this section) we will be assigning the location of this directory to the $ORACLE_BASE environment variable. After the directory is created, you must then specify the correct owner, group, and permissions for it.


[root@oemprod ~]# mkdir -p /u01/app/oracle
[root@oemprod ~]# chown -R oracle:oinstall /u01/app
[root@oemprod ~]# chmod -R 775 /u01/app
Next, create the directory that will be used to store the Oracle database files for the Management Repository (on the /u02 file system):


[root@oemprod ~]# mkdir -p /u02/oradata
[root@oemprod ~]# chown oracle:oinstall /u02/oradata
[root@oemprod ~]# chmod 775 /u02/oradata

[root@oemprod ~]# mkdir -p /u03/flash_recovery_area
[root@oemprod ~]# chown oracle:oinstall /u03/flash_recovery_area
[root@oemprod ~]# chmod 775 /u03/flash_recovery_area
To ensure that the environment is setup correctly for the "oracle" UNIX user account, use the following .bash_profile:


Login to the database server as the oracle user account:
[root@oemprod ~]# su - oracle
.bash_profile for Oracle User
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi

alias ls="ls -FA"

export JAVA_HOME=/usr/local/java

# User specific environment and startup programs
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/oms10g
export ORACLE_PATH=$ORACLE_BASE/common/oracle/sql:.:$ORACLE_HOME/rdbms/admin
export ORACLE_SID=oms10g
export PATH=.:${JAVA_HOME}/bin:${PATH}:$HOME/bin:$ORACLE_HOME/bin
export PATH=${PATH}:$ORACLE_HOME/dcm/bin:$ORACLE_HOME/opmn/bin
export PATH=${PATH}:$ORACLE_HOME/Apache/Apache/bin
export PATH=${PATH}:/usr/bin:/bin:/usr/bin/X11:/usr/local/bin
export PATH=${PATH}:$ORACLE_BASE/common/oracle/bin
export ORACLE_TERM=xterm
export TNS_ADMIN=$ORACLE_BASE/product/11.1.0/db_1/network/admin
#export ORA_NLS10=$ORACLE_BASE/product/11.1.0/db_1/nls/data
export NLS_DATE_FORMAT="DD-MON-YYYY HH24:MI:SS"
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$ORACLE_HOME/opmn/lib
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/lib:/usr/lib:/usr/local/lib
export CLASSPATH=$ORACLE_HOME/JRE
export CLASSPATH=${CLASSPATH}:$ORACLE_HOME/jlib
export CLASSPATH=${CLASSPATH}:$ORACLE_HOME/rdbms/jlib
export CLASSPATH=${CLASSPATH}:$ORACLE_HOME/network/jlib
export THREADS_FLAG=native
export TEMP=/tmp
export TMPDIR=/tmp

Prepare the Existing Oracle 11g Database for the Grid Control Install
Before installing Enterprise Manager Grid Control with an existing, certified Oracle database, ensure that you meet the prerequisites described in this section.
The existing Oracle database and TNS Listener process must be running prior to installing Enterprise Manager Grid Control.
Enable Fine Grained Access Control
Make sure that the Enterprise Edition database you select for the Oracle Management Repository has the Fine Grained Access Control (FGAC) option set to true. This is required for a successful Management Repository creation. Check v$options for this setting:

SQL> select value from v$option where parameter = 'Fine-grained access control';

VALUE
-----------
TRUE
The FGAC option is typically installed and enabled during a default install and database creation.
If for any reason the FGAC option is not enabled, run the following in SQL*Plus as the SYS user in the order specified to create the DBMS_RLS package:
SQL> $ORACLE_HOME/rdbms/admin/dbmsrlsa.sql
SQL> $ORACLE_HOME/rdbms/admin/prvtrlsa.plb
Install DBMS_SHARED_POOL Package
Verify the DBMS_SHARED_POOL package is installed on the existing Oracle database by running the following statement:
SQL> select count(*) from DBA_OBJECTS where object_name='DBMS_SHARED_POOL';

COUNT(*)
----------
2
If the count returned is zero, then log in as SYSDBA, install the DBMS_SHARED_POOL package, and then re-check:
SQL> @?/rdbms/admin/dbmspool.sql

Package created.


Grant succeeded.


View created.


Package body created.

SQL> commit;

Commit complete.

SQL> @?/rdbms/admin/utlrp.sql

SQL> select count(*) from DBA_OBJECTS where object_name='DBMS_SHARED_POOL';

COUNT(*)
----------
2
Remove any Existing Management Repository
The existing Oracle database must be free of any prior repository contents, whether for Database Control or Grid Control. The existing Oracle 11g database in my example was configured with Database Control:
[oracle@oemprod ~]$ . oraenv
ORACLE_SID = [oms10g] ? emrep
The Oracle base for ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1 is /u01/app/oracle

[oracle@oemprod ~]$ emctl status dbconsole
Oracle Enterprise Manager 11g Database Control Release 11.1.0.7.0
Copyright (c) 1996, 2008 Oracle Corporation. All rights reserved.
https://oemprod:1158/em/console/aboutApplication
Oracle Enterprise Manager 11g is running.
------------------------------------------------------------------
Logs are generated in directory /u01/app/oracle/product/11.1.0/db_1/oemprod_emrep/sysman/log
If your existing Oracle database is configured with Database Control, then ensure that you de-configure it before you begin the installation of Grid Control.
To de-configure Database Control for a single instance database, run the following command:

[oracle@oemprod ~]$ echo $ORACLE_SID
emrep

[oracle@oemprod ~]$ $ORACLE_HOME/bin/emca -deconfig dbcontrol db -repos drop

STARTED EMCA at May 2, 2009 5:07:58 PM
EM Configuration Assistant, Version 11.1.0.7.0 Production
Copyright (c) 2003, 2005, Oracle. All rights reserved.

Enter the following information:
Database SID: emrep
Listener port number: 1521
Password for SYS user: emgc10g
Password for SYSMAN user: emgc10g
Do you wish to continue? [yes(Y)/no(N)]: Y
May 2, 2009 5:08:21 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /u01/app/oracle/cfgtoollogs/emca/emrep/emca_2009_05_02_17_07_58.log.
May 2, 2009 5:08:22 PM oracle.sysman.emcp.util.DBControlUtil stopOMS
INFO: Stopping Database Control (this may take a while) ...
May 2, 2009 5:08:46 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Dropping the EM repository (this may take a while) ...
May 2, 2009 5:11:43 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully dropped
Enterprise Manager configuration completed successfully
FINISHED EMCA at May 2, 2009 5:11:50 PM
To de-configure Database Control for a Real Application Clusters (RAC) database, run the following command:
$ORACLE_HOME/bin/emca -deconfig dbcontrol db -repos drop - cluster

Verify Existing oraInventory Location
Given the fact that Enterprise Manager 10g Grid Control will be installed on a server with an existing Oracle product (Oracle Database 11g Release 1 Enterprise Edition), verify the oraInventory location:
[oracle@oemprod ~]$ cat /etc/oraInst.loc
inventory_loc=/u01/app/oraInventory
inst_group=oinstall
Password Verification Requirements
Ensure that the profile of the Password Verification resource name has the "Default" value. If the Password Verification is enabled, repository creation may fail.
NLS_LANG Environment Variable Requirements
If your operating system is Linux, then ensure the NLS_LANG environment variable (or ORA_NLS10 in my case) is set with a value that is compatible with the operating system default locale setting and the Management Repository database character set.
In this article, I set the ORA_NLS10 environment variable in the .bash_profile log in script for the oracle UNIX account as follows:
export ORA_NLS10=$ORACLE_HOME/nls/data
Grant EXECUTE Privilege on DBMS_RANDOM to DBSNMP
SQL> grant execute on dbms_random to dbsnmp;

Grant succeeded.
Fixed Initialization Parameter Values
The initialization parameters must be set correctly for your certified existing Oracle Database Enterprise Edition, to be able to create a Management Repository. You should also set all fixed parameters for your Management Repository database. After making the changes, you must shut down and restart the database.
The following table lists the parameters and their fixed values that must be met for successful Management Repository database creation. These parameters are verified by Oracle Universal Installer prerequisite checks during installation.
Fixed Initialization Parameter Values
Parameter Value
job_queue_processes 10
db_block_size 8192
timed_statistics TRUE
open_cursors 300
session_cached_cursors 200
aq_tm_processes 1
compatible (default)
undo_management AUTO
undo_retention 10800
undo_tablespace
processes 150
log_buffer 1048576
statistics_level TYPICAL (Note that this value is specific only to Enterprise Manager 10g Repository Database release and later.)
TEMP space (Tablespace) 50 MB (extending to 100 MB)
_b_tree_bitmap_plans false (hidden parameter)
For example, I needed to make the following modifications:
SQL> alter system set session_cached_cursors=200 scope=spfile;

System altered.

SQL> alter system set aq_tm_processes=4 scope=spfile;

System altered.

SQL> alter system set sga_target=1012M scope=spfile;

System altered.

SQL> alter system set sga_max_size=1012M scope=spfile;

System altered.

SQL> alter system set undo_retention=10800 scope=spfile;

System altered.

SQL> alter system set memory_target=1331200000 scope=spfile;

System altered.

SQL> alter system set db_cache_size=384M scope=spfile;

System altered.

SQL> alter system set shared_pool_size=512M scope=spfile;

System altered.

SQL> alter system set pga_aggregate_target=256M scope=spfile;

System altered.

SQL> alter system set "_b_tree_bitmap_plans"=false scope=spfile;

System altered.

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.

SQL> startup open
ORACLE instance started.

Total System Global Area 1058779136 bytes
Fixed Size 1318084 bytes
Variable Size 545260348 bytes
Database Buffers 507510784 bytes
Redo Buffers 4689920 bytes
Database mounted.
Database opened.

Create Oratab Entries
Prepare the Enterprise Manager 10g Grid Control environment by creating the following entries in the /etc/oratab file:

[root@oemprod ~]# echo oms10g:/u01/app/oracle/product/oms10g:N >> /etc/oratab
[root@oemprod ~]# echo agent10g:/u01/app/oracle/product/agent10g:N >> /etc/oratab
[root@oemprod ~]# echo db10g:/u01/app/oracle/product/11.2.0/db_1:N >> /etc/oratab
[root@oemprod ~]# chown oracle:oinstall /etc/oratab
[root@oemprod ~]# chmod 664 /etc/oratab

Verify /etc/oratab entries:
[oracle@oemprod ~]$ cat /etc/oratab | grep '^[^#]'
emrep:/u01/app/oracle/product/11.1.0/db_1:Y
oms10g:/u01/app/oracle/product/oms10g:N
agent10g:/u01/app/oracle/product/agent10g:N
db10g:/u01/app/oracle/product/11.1.0/db_1:N

________________________________________
Install Enterprise Manager Base Version 10.2.0.1
Download and install Oracle Enterprise Manager 10g Grid Control Release 2 (10.2.0.1) to the server using the "Installing Software-Only and Configuring Later" (Silent Mode) method.
Download Oracle Enterprise Manager Release 2 Software
Download the Oracle Enterprise Manager 10g Grid Control Release 2 (10.2.0.1) software for Linux x86 (or Oracle Enterprise Manager 10g Grid Control Release 3 (10.2.0.3) software for Linux x86_64 if you are using a 64-bit O/S) from the Oracle Technology Network (OTN).
If you do not currently have an account with Oracle OTN, you will need to create one. This is a FREE account!
Oracle offers a development and testing license free of charge. No support, however, is provided and the license does not permit production use. A full description of the license agreement is available on OTN.

Oracle Enterprise Manager 10g Grid Control Release 2 (10.2.0.1) for Linux x86
• Linux_Grid_Control_full_102010_disk1.zip (643,714,642 bytes)
• Linux_Grid_Control_full_102010_disk2.zip (615,240,646 bytes)
• Linux_Grid_Control_full_102010_disk3.zip (551,557,959 bytes)
Oracle Enterprise Manager 10g Grid Control Release 3 (10.2.0.3) for Linux x86-64
• Linux_x86_64_Grid_Control_full_102030_disk1.zip (1,384,327,274 bytes)
• Linux_x86_64_Grid_Control_full_102030_disk2.zip (806,746,437 bytes)
As the "oracle" user account, extract the three archived files (I'm using the 32-bit version) you downloaded to a temporary directory. In this example, I will use /home/oracle/software/grid_control/oem_r2.
[oracle@oemprod ~]$ cd /home/oracle/software/grid_control/oem_r2
[oracle@oemprod oem_r2]$ unzip Linux_Grid_Control_full_102010_disk1.zip
[oracle@oemprod oem_r2]$ unzip Linux_Grid_Control_full_102010_disk2.zip
[oracle@oemprod oem_r2]$ unzip Linux_Grid_Control_full_102010_disk3.zip

Perform Prerequisite Checks using the Oracle Universal Installer (as oracle) EM10.2.iso
You can run the prerequisite checker in standalone mode prior to starting the runInstaller. This helps you identify and resolve issues that might otherwise cause the installation to fail.
[oracle@oemprod ~]$ /home/oracle/software/grid_control/oem_r2/install/runInstaller \
-prereqchecker PREREQ_CONFIG_LOCATION=/home/oracle/software/grid_control/oem_r2/rdbms/Disk1/stage/prereq \
-entryPoint oracle.sysman.top.em_seed_Core -prereqLogLoc /home/oracle -silent

Starting Oracle Prerequisite Checker...

Checking installer requirements...

Checking operating system version: must be redhat-3, redhat-4 or SuSE-9
Passed

Checking for Kernel version 2.4.21 Passed
Checking for glibc version glibc-2.3.2-95.3 Passed
Checking swap space: must be greater than 150 MB. Actual 4367 MB Passed

All installer requirements met.

........ ........

Checking for shmmax=2147483648; found shmmax=536870912. Failed <<<< ........ ........

Check complete: Passed
=======================================================================
PrereqChecks complete
The above prerequisite check will fail while attempting to verify the value of the kernel parameter shmmax. This can be safely ignored. Although the operating system is RHEL 5, the Prerequisite Checker assumes the O/S is redhat-3:
...
Expected result: One of redhat-3,redhat-4,SuSE-8,SuSE-9
Actual Result: redhat-3
...
Under RHEL 3, the minimum value for shmmax is 2147483648 while under RHEL 5, the minimum value is 536870912.
[oracle@oemprod ~]$ /home/oracle/software/grid_control/oem_r2/install/runInstaller \
-prereqchecker PREREQ_CONFIG_LOCATION=/home/oracle/software/grid_control/oem_r2/rdbms/Disk1/stage/prereq \
-entryPoint oracle.sysman.top.oms_Core -prereqLogLoc /home/oracle -silent

Starting Oracle Prerequisite Checker...

Checking installer requirements...

Checking operating system version: must be redhat-3, redhat-4 or SuSE-9
Passed

Checking for Kernel version 2.4.21 Passed
Checking for glibc version glibc-2.3.2-95.3 Passed
Checking swap space: must be greater than 150 MB. Actual 4366 MB Passed

All installer requirements met.

........ ........

Check complete: Passed
=======================================================================
PrereqChecks complete

Prepare Response File for Silent Install
Installing Enterprise Manager 10g Grid Control and the Release 5 patch set will be performed using the Silent Mode option of the Oracle Universal Installer. Oracle packages several response files with the Enterprise Manager Grid Control software in the /response directory which can be customized and used to perform silent installs.
To install Enterprise Manager 10g Grid Control using an existing database, customize the response file em_using_existing_db.rsp (after, of course, making a backup of the original file).
Backup and then edit the response file em_using_existing_db.rsp specifying all the parameters required for a successful installation. To understand the mandatory parameters you need to specify, see the table below which includes a column (Example Value) indicating the values I used for this install. The response file contains a complete description for each of the parameters listed in the table.
[oracle@oemprod response]$ cd /home/oracle/software/grid_control/oem_r2/response
[oracle@oemprod response]$ cp em_using_existing_db.rsp em_using_existing_db.rsp.backup
[oracle@oemprod response]$ vi em_using_existing_db.rsp
Parameters to Modify in em_using_existing_db.rsp File
Parameter Example Value
UNIX_GROUP_NAME "oinstall"
FROM_LOCATION "/home/oracle/software/grid_control/oem_r2/oms/Disk1/stage/products.xml"
BASEDIR "/u01/app/oracle/product"
INSTALLATION_NAME "oms10g"
s_reposHost "oemprod.idevelopment.info"
s_reposPort "1521"
s_reposSID "emrep"
s_reposDBAPwd "emgc10g"
s_mgmtTbsName "/u02/oradata/EMREP/datafile/mgmt.dbf"
s_ecmTbsName "/u02/oradata/EMREP/datafile/mgmt_ecm_depot1.dbf"
b_emailSelected true
s_emailAddress "jhunter@idevelopment.info"
s_emailServer "localhost"
s_securePassword "emgc10g"
s_securePasswordConfirm "emgc10g"
b_lockedSelected false
s_reposPwd "emgc10g"
s_reposPwdConfirm "emgc10g"
When modifying values in the response file, ensure to use double quotes ("") or curly braces ({}) where indicated. Omission of these character string conditioners may lead to errors like the listener port number being inserted as a null value instead instead of 1521 (as in the example above), leading to failure which can be difficult to diagnose without detailed log review and a need to start the entire process over.


Example Response File
em_using_existing_db.rsp

Install Enterprise Manager 10.2.0.1
After preparing the response file em_using_existing_db.rsp, log in as the oracle user account and invoke the runInstaller.
[root@oemprod ~]# su - oracle

[oracle@oemprod ~]$ . oraenv
ORACLE_SID = [oms10g] ? oms10g
The Oracle base for ORACLE_HOME=/u01/app/oracle/product/oms10g is /u01/app/oracle

[oracle@oemprod ~]$ cd /home/oracle/software/grid_control/oem_r2

[oracle@oemprod oem_r2]$ ./runInstaller -noconfig -ignoreSysPrereqs -silent \
-responseFile /home/oracle/software/grid_control/oem_r2/response/em_using_existing_db.rsp \
use_prereq_checker=false
The base product release will be logged by the Oracle Universal Installer in two installActions.log files and two silentInstall.log files in the oraInventory/logs directory. For example:
/u01/app/oraInventory/logs/installActions2009-05-03_02-28-04AM.log
/u01/app/oraInventory/logs/silentInstall2009-05-03_02-28-04AM.log
/u01/app/oraInventory/logs/installActions2009-05-03_02-32-43-AM.log
/u01/app/oraInventory/logs/silentInstall2009-05-03_02-32-43-AM.log
The above four log files will also be copied to the directories $ORACLE_BASE/product/oms10g/cfgtoollogs/oui and $ORACLE_BASE/product/agent10g/cfgtoollogs/oui respectively. For example:
$ORACLE_BASE/product/oms10g/cfgtoollogs/oui/installActions2009-05-03_02-28-04AM.log
$ORACLE_BASE/product/oms10g/cfgtoollogs/oui/silentInstall2009-05-03_02-28-04AM.log
$ORACLE_BASE/product/agent10g/cfgtoollogs/oui/installActions2009-05-03_02-32-43-AM.log
$ORACLE_BASE/product/agent10g/cfgtoollogs/oui/silentInstall2009-05-03_02-32-43-AM.log

At the end of the installation process, log in as the root user in a new command session and run the scripts on the host where the base release of Enterprise Manager Grid Control is installed, when prompted by the installer.
For the purpose of this article, Enterprise Manager Grid Control was not the first Oracle product installed to this server (the first Oracle product installed on this server was Oracle Database 11g). Therefore, the installer will not prompt you to run the /u01/app/oraInventory/orainstRoot.sh script as this was already performed during the database software installation. You are, however, prompted to run the allroot.sh script:
[root@oemprod ~]# /u01/app/oracle/product/oms10g/allroot.sh

Install Enterprise Manager 10g Grid Control Release 2 Screen Output...

________________________________________
Patch the Enterprise Manager Installation to 10.2.0.5
Apply the Oracle Enterprise Manager 10g Grid Control Release 5 (10.2.0.5) patchset to the previously installed Oracle Enterprise Manager 10g Grid Control Release 2 (10.2.0.1) base release. As done with the base release install, applying the Release 5 patch set will be performed using the "Installing Software-Only and Configuring Later" (Silent Mode) method.
Download Oracle Enterprise Manager Release 5 Software
Download the Oracle Enterprise Manager 10g Grid Control Release 5 (10.2.0.5) software for Linux x86 (or x86_64 if you are using a 64-bit O/S) from the Oracle Technology Network (OTN).
If you do not currently have an account with Oracle OTN, you will need to create one. This is a FREE account!
Oracle offers a development and testing license free of charge. No support, however, is provided and the license does not permit production use. A full description of the license agreement is available on OTN.

Oracle Enterprise Manager 10g Grid Control Release 5 (10.2.0.5) for Linux x86
• gc_10205_part1of2.zip (1,138,311,452 bytes)
• gc_10205_part2of2.zip (1,137,845,265 bytes)
Oracle Enterprise Manager 10g Grid Control Release 5 (10.2.0.5) for Linux x86-64
• gc_x86_64_10205_part1of2.zip (1,138,415,755 bytes)
• gc_x86_64_10205_part2of2.zip (1,137,978,042 bytes)
As the "oracle" user account, extract the two archived files (I'm using the 32-bit version) you downloaded to a temporary directory. In this example, I will use /home/oracle/software/grid_control/oem_r5.
[oracle@oemprod ~]$ cd /home/oracle/software/grid_control/oem_r5

[oracle@oemprod oem_r5]$ unzip gc_10205_part1of2.zip
Archive: gc_10205_part1of2.zip
extracting: 3731596.zip
extracting: 3822442.zip
inflating: README.txt
creating: doc/
inflating: doc/BugList_EMGC_10.2.0.5.pdf
inflating: doc/ReleaseNotes_EMGC_10.2.0.5.html
inflating: doc/ReleaseNotes_EMGC_10.2.0.5.pdf
inflating: doc/BugList_EMGC_10.2.0.5.html

[oracle@oemprod oem_r5]$ unzip gc_10205_part2of2.zip
Archive: gc_10205_part2of2.zip
extracting: p3731593_10205_LINUX.zip

[oracle@oemprod oem_r5]$ unzip p3731593_10205_LINUX.zip
The ZIP file p3731593_10205_LINUX.zip contains the 10.2.0.5 patch set software which will be used for:
• Upgrading Oracle Management Service Release 2 (10.2.0.x) or higher to Oracle Management Service Release 5 (10.2.0.5)
• Upgrading Oracle Management Repository (sysman schema)
• Upgrading Oracle Management Agent on the host where OMS is running.
Also note that this process will not upgrade the database in which the Management Repository (sysman schema) resides. The database will remain at Oracle Database 10g Release 1 (10.1.0.4) even if you upgrade Grid Control to any higher release using the patch sets. The Oracle Database does not get upgraded unless it is performed separately outside of the Grid Control installation.


Stop OPMN Processes
Before starting the Enterprise Manager 10.2.0.5 patch set installation, stop all the OPMN processes by running the following command from the Oracle home directory of the OMS (for example, oms10g):
[oracle@oemprod ~]$ . oraenv
ORACLE_SID = [oms10g] ? oms10g
The Oracle base for ORACLE_HOME=/u01/app/oracle/product/oms10g is /u01/app/oracle


?????………………cd app/oracle/OracleHomes/

[oracle@oemprod ~]$ $ORACLE_HOME/opmn/bin/opmnctl stopall
opmnctl: stopping opmn and all managed processes...

Prepare Response File for OMS Silent Install
Applying the Enterprise Manager 10g Grid Control Release 5 patch set for OMS will be performed using the Silent Mode option of the Oracle Universal Installer. Oracle packages a response file named patchset.rsp with the patch set software in the /response directory which can be customized and used to perform silent installs.
Create a copy of the patchset.rsp response file and modify the six values indicated in the table below:
[oracle@oemprod response]$ cd /home/oracle/software/grid_control/oem_r5/3731593/Disk1/response
[oracle@oemprod response]$ cp patchset.rsp oms_patchset.rsp
[oracle@oemprod response]$ vi oms_patchset.rsp
Parameters to Modify in oms_patchset.rsp File
Parameter Example Value
FROM_LOCATION "/home/oracle/software/grid_control/oem_r5/3731593/Disk1/stage/products.xml"
ORACLE_HOME "/u01/app/oracle/product/oms10g"
b_softwareonly true
s_sysPassword "emgc10g"
sl_pwdInfo { "emgc10g" }
oracle.iappserver.st_midtier:szl_InstanceInformation { "emgc10g" }

Example Response File
oms_patchset.rsp



####################################################################
## Copyright (c) 1999, 2009 Oracle. All rights reserved. ##
## ##
## Specify values for the variables listed below to customize ##
## your installation. ##
## ##
## Each variable is associated with a comment. The comment ##
## identifies the variable type. ##
## ##
## Please specify the values in the following format: ##
## ##
## Type Example ##
## String "Sample Value" ##
## Boolean True or False ##
## Number 1000 ##
## StringList {"String value 1","String Value 2"} ##
## ##
## The values that are given as need to be ##
## specified for a silent installation to be successful. ##
## ##
## ##
## This response file is generated by Oracle Software ##
## Packager. ##
####################################################################
RESPONSEFILE_VERSION=2.2.1.0.0

#-------------------------------------------------------------------------------
#Name : UNIX_GROUP_NAME
#Datatype : String
#Description: Unix group to be set for the inventory directory. Valid only in Unix platforms.
#Example: UNIX_GROUP_NAME = "install"
#-------------------------------------------------------------------------------
UNIX_GROUP_NAME=

#-------------------------------------------------------------------------------
#Name : FROM_LOCATION
#Datatype : String
#Description: Complete path to the products.xml.
#Example: FROM_LOCATION = "../stage/products.xml"
#-------------------------------------------------------------------------------
FROM_LOCATION="/home/oracle/software/grid_control/oem_r5/3731593/Disk1/stage/products.xml"

#-------------------------------------------------------------------------------
#Name : ORACLE_HOME
#Datatype : String
#Description: Complete path of the Oracle Home.
#Example: ORACLE_HOME = "C:\OHOME1"
#-------------------------------------------------------------------------------
ORACLE_HOME="/u01/app/oracle/product/oms10g"

#-------------------------------------------------------------------------------
#Name : SOFTWARE_ONLY_INSTALL
#Datatype : Boolean
#Description: Set to true if softwareonly installation need to be done and configuration can be run later.
#Example: b_softwareonly = true
#-------------------------------------------------------------------------------
b_softwareonly=true

#-------------------------------------------------------------------------------
#Name : START OMS AFTER APPLYING PATCH
#Datatype : Boolean
#Description: Set to true inorder to start OMS after applying patch.
#Example: b_startOMS = true/false
#-------------------------------------------------------------------------------
b_startOMS=true

#-------------------------------------------------------------------------------
#Name : s_sysPassword
#Datatype : String
#Description: password for repsitory creation , this should be set, if b_softwareonly=true
#Example: s_sysPassword="password"
#-------------------------------------------------------------------------------
s_sysPassword="imag3"

#-------------------------------------------------------------------------------
#Name : TOPLEVEL_COMPONENT
#Datatype : StringList
#Description: The top level component to be installed in the current session.
#The choices are of the form Internal Name, Version : External name. Please use
#the internal name and version while specifying the value.
# oracle.sysman.patchset, 10.2.0.5.0 : Enterprise Manager Patchset 10.2.0.5.0
#Example: TOPLEVEL_COMPONENT = {"oracle.sysman.patchset","10.2.0.5.0"}
#-------------------------------------------------------------------------------
TOPLEVEL_COMPONENT={"oracle.sysman.patchset","10.2.0.5.0"}

#-------------------------------------------------------------------------------
#Name : DEINSTALL_LIST
#Datatype : StringList
#Description: List of components to be deinstalled during a deinstall session.
#The choices are of the form Internal Name, Version : External name. Please use
#the internal name and version while specifying the value.
# oracle.sysman.patchset, 10.2.0.5.0 : Enterprise Manager Patchset 10.2.0.5.0
#Example: DEINSTALL_LIST = {"oracle.sysman.patchset","10.2.0.5.0"}
#-------------------------------------------------------------------------------
DEINSTALL_LIST={"oracle.sysman.patchset","10.2.0.5.0"}

#-------------------------------------------------------------------------------
#Name : SHOW_SPLASH_SCREEN
#Datatype : Boolean
#Description: Set to true if the initial splash screen in OUI needs to be shown.
#Example: SHOW_SPLASH_SCREEN = true
#-------------------------------------------------------------------------------
SHOW_SPLASH_SCREEN=true

#-------------------------------------------------------------------------------
#Name : SHOW_WELCOME_PAGE
#Datatype : Boolean
#Description: Set to true if the Welcome page in OUI needs to be shown.
#Example: SHOW_WELCOME_PAGE = false
#-------------------------------------------------------------------------------
SHOW_WELCOME_PAGE=false

#-------------------------------------------------------------------------------
#Name : SHOW_SUMMARY_PAGE
#Datatype : Boolean
#Description: Set to true if the summary page in OUI needs to be shown.
#The summary page shows the list of components that will be installed in this
#session.
#Example: SHOW_SUMMARY_PAGE = true
#-------------------------------------------------------------------------------
SHOW_SUMMARY_PAGE=true

#-------------------------------------------------------------------------------
#Name : SHOW_INSTALL_PROGRESS_PAGE
#Datatype : Boolean
#Description: Set to true if the install progress page in OUI needs to be shown.
#This page shows the current status in the installation. The current status
#includes the product being installed and the file being copied.
#Example: SHOW_INSTALL_PROGRESS_PAGE = true
#-------------------------------------------------------------------------------
SHOW_INSTALL_PROGRESS_PAGE=true

#-------------------------------------------------------------------------------
#Name : SHOW_REQUIRED_CONFIG_TOOL_PAGE
#Datatype : Boolean
#Description: Set to true if the required config assistants page in OUI needs to
#be shown. This page shows the list of required configuration assistants that
#are part of this installation. It shows the status of each assistant,
#including any failures with detailed information on why it failed.
#Example: SHOW_REQUIRED_CONFIG_TOOL_PAGE = true
#-------------------------------------------------------------------------------
SHOW_REQUIRED_CONFIG_TOOL_PAGE=true

#-------------------------------------------------------------------------------
#Name : SHOW_CONFIG_TOOL_PAGE
#Datatype : Boolean
#Description: Set to true if the config assistants page in OUI needs to be
#shown. This page shows the list of configuration assistants that are part of
#this installation and are configured to launch automatically. It shows the
#status of each assistant, including any failures with detailed information on
#why it failed.
#Example: SHOW_CONFIG_TOOL_PAGE = true
#-------------------------------------------------------------------------------
SHOW_CONFIG_TOOL_PAGE=true

#-------------------------------------------------------------------------------
#Name : SHOW_XML_PREREQ_PAGE
#Datatype : Boolean
#Description: This variable determines whether or not to show the prereq page.
#Example: SHOW_XML_PREREQ_PAGE = true
#-------------------------------------------------------------------------------
SHOW_XML_PREREQ_PAGE=true

#-------------------------------------------------------------------------------
#Name : SHOW_END_OF_INSTALL_MSGS
#Datatype : Boolean
#Description: Set to true if the text on end of install screen is to be shown.
#The text is always available under /install/readme.txt.
#Example: SHOW_END_OF_INSTALL_MSGS = true
#-------------------------------------------------------------------------------
SHOW_END_OF_INSTALL_MSGS=true

#-------------------------------------------------------------------------------
#Name : SHOW_ROOTSH_CONFIRMATION
#Datatype : Boolean
#Description: Set to true if the Confirmation dialog asking to run the root.sh
#script in OUI needs to be shown.
#Valid only for Unix platforms.
#Example: SHOW_ROOTSH_CONFIRMATION = true
#-------------------------------------------------------------------------------
SHOW_ROOTSH_CONFIRMATION=true

#-------------------------------------------------------------------------------
#Name : SHOW_END_SESSION_PAGE
#Datatype : Boolean
#Description: Set to true if the end of session page in OUI needs to be shown.
#This page shows if the installation is successful or not.
#Example: SHOW_END_SESSION_PAGE = true
#-------------------------------------------------------------------------------
SHOW_END_SESSION_PAGE=true

#-------------------------------------------------------------------------------
#Name : SHOW_EXIT_CONFIRMATION
#Datatype : Boolean
#Description: Set to true if confirmation when exiting OUI needs to be shown.
#Example: SHOW_EXIT_CONFIRMATION = true
#-------------------------------------------------------------------------------
SHOW_EXIT_CONFIRMATION=false

#-------------------------------------------------------------------------------
#Name : CLUSTER_NODES
#Datatype : StringList
#Description: This variable represents the cluster node names selected by the
#user for installation. Required for RAC installs.
#Example: CLUSTER_NODES = {"node1"}
#-------------------------------------------------------------------------------
CLUSTER_NODES={}

#-------------------------------------------------------------------------------
#Name : sl_pwdInfo
#Datatype : StringList
#Description:
#sl_pwdInfo will take SYS password; SYS password for repository database;
#patchset.rsp file will be used for patching both OMS and Additional Management Agent
#But, "sl_pwdInfo" variable is required for only OMS patching and not required for Additional Management Agent
#Component : oracle.sysman.top.oms
#Example: for SYS password sl_pwdInfo will be { "manager" }
#-------------------------------------------------------------------------------
sl_pwdInfo={ "imag3" }

#-------------------------------------------------------------------------------
#Name : n_validate
#Datatype : number
#Description: Flag for validation of sl_pwdInfo
# This value should not be modified
#Component : oracle.sysman.top.oms
#-------------------------------------------------------------------------------
n_validate=1

#-------------------------------------------------------------------------------
#Name : szl_InstanceInformation
#Datatype : StringList
#Description: Required for Software Update installation on Middle-Tiers. Instance password for the current OracleAS 10g instance. There is only one value for this stringlist: { "password1" }. The password value used in this stringlist must match the existing password already established for this instance. Note that the password must be specified in cleartext, for security, restrict access to the silent install response files and delete them when no longer needed.
#Component : oracle.iappserver.st_midtier
#-------------------------------------------------------------------------------

oracle.iappserver.st_midtier:szl_InstanceInformation={ "imag3" }

#-------------------------------------------------------------------------------
#Name : ACCEPT_LICENSE_AGREEMENT
#Datatype : Boolean
#Description: By setting this variable to true, you are accepting the license agreement. This variable is used only for silent installations.
#Example: ACCEPT_LICENSE_AGREEMENT = true
#-------------------------------------------------------------------------------
ACCEPT_LICENSE_AGREEMENT=true

#-------------------------------------------------------------------------------
#Name : METALINK_USERNAME
#Datatype : String
#Description: S_METALINK_USERNAME_DESC
#Example: METALINK_USERNAME =
#-------------------------------------------------------------------------------
METALINK_USERNAME=

#-------------------------------------------------------------------------------
#Name : METALINK_PASSWORD
#Datatype : String
#Description: S_METALINK_PASSWORD_DESC
#Example: METALINK_PASSWORD =
#-------------------------------------------------------------------------------
METALINK_PASSWORD=

#-------------------------------------------------------------------------------
#Name : PROXY_HOST
#Datatype : String
#Description: S_PROXY_HOST_DESC
#Example: PROXY_HOST =
#-------------------------------------------------------------------------------
PROXY_HOST=

#-------------------------------------------------------------------------------
#Name : PROXY_PORT
#Datatype : String
#Description: S_PROXY_PORT_DESC
#Example: PROXY_PORT =
#-------------------------------------------------------------------------------
PROXY_PORT=

#-------------------------------------------------------------------------------
#Name : PROXY_USER
#Datatype : String
#Description: S_PROXY_USER_DESC
#Example: PROXY_USER =
#-------------------------------------------------------------------------------
PROXY_USER=

#-------------------------------------------------------------------------------
#Name : PROXY_PWD
#Datatype : String
#Description: S_PROXY_PWD_DESC
#Example: PROXY_PWD =
#-------------------------------------------------------------------------------
PROXY_PWD=

#-------------------------------------------------------------------------------
#Name : DECLINE_SECURITY_UPDATES
#Datatype : Boolean
#Description: S_DECLINE_SECURITY_UPDATES_DESC
#Example: DECLINE_SECURITY_UPDATES =false
#-------------------------------------------------------------------------------
DECLINE_SECURITY_UPDATES=true

#-------------------------------------------------------------------------------
#Name : COLLECTOR_RESPONSE_FILE
#Datatype : String
#Description: S_COLLECTOR_RESPONSE_FILE_DESC
#Example: COLLECTOR_RESPONSE_FILE =
#-------------------------------------------------------------------------------
COLLECTOR_RESPONSE_FILE=

#-------------------------------------------------------------------------------
#Name : SECURITY_UPDATES_VIA_METALINK
#Datatype : Boolean
#Description: S_SECURITY_UPDATES_VIA_METALINK_DESC
#Example: SECURITY_UPDATES_VIA_METALINK =
#-------------------------------------------------------------------------------
SECURITY_UPDATES_VIA_METALINK=



Apply the 10.2.0.5 Patch Set to OMS
After preparing the response file oms_patchset.rsp, apply the 10.2.0.5 patch set to the Oracle home directory of the Oracle Management Service. For the purpose of this article, the Oracle home directory of the Oracle Management Service is /u01/app/oracle/product/oms10g.
[root@oemprod ~]# su - oracle

[oracle@oemprod ~]$ . oraenv
ORACLE_SID = [oms10g] ? oms10g
The Oracle base for ORACLE_HOME=/u01/app/oracle/product/oms10g is /u01/app/oracle

[oracle@oemprod ~]$ cd /home/oracle/software/grid_control/oem_r5/3731593/Disk1

[oracle@oemprod Disk1]$ ./runInstaller -noconfig -silent \
-responseFile /home/oracle/software/grid_control/oem_r5/3731593/Disk1/response/oms_patchset.rsp
Note that during the Grid Control base release installation (10.2.0.1), we used the "-ignoreSysPrereqs" argument because it was being installed on a non-supported operating system (RHEL 5). Since 10.2.0.5 is supported on RHEL 5, OEL5, and SuSE10, do not include the "-ignoreSysPrereqs" argument so you can verify the prerequisite checks are successful.

At the end of the installation process, verify there were no errors in the installActions.log log file which can be found in the oraInventory/logs directory. The log file will have a later timestamp than the log files created for the Grid Control base installation. For example:
/u01/app/oraInventory/logs/installActions2009-05-03_01-50-03PM.log
Next, log in as the root user in a new command session and run the root.sh script when prompted by the installer.
[root@oemprod ~]# /u01/app/oracle/product/oms10g/root.sh
Note that the root.sh script will not produce any output.

Install Enterprise Manager 10g Grid Control Release 5 (OMS) Screen Output...













Prepare Response File for the Management Agent Silent Install
Applying the Enterprise Manager 10g Grid Control Release 5 patch set for the Oracle Management Agent will be performed using the Silent Mode option of the Oracle Universal Installer. Oracle packages a response file named patchset.rsp with the patch set software in the /response directory which can be customized and used to perform silent installs.
Create a copy of the patchset.rsp response file and modify the five values indicated in the table below:
[oracle@oemprod response]$ cd /home/oracle/software/grid_control/oem_r5/3731593/Disk1/response
[oracle@oemprod response]$ cp patchset.rsp agent_patchset.rsp
[oracle@oemprod response]$ vi agent_patchset.rsp
Parameters to Modify in agent_patchset.rsp File
Parameter Example Value
FROM_LOCATION "/home/oracle/software/grid_control/oem_r5/3731593/Disk1/stage/products.xml"
ORACLE_HOME "/u01/app/oracle/product/agent10g"
b_softwareonly true
s_sysPassword "emgc10g"
sl_pwdInfo { "emgc10g" }

Example Response File
agent_patchset.rsp

Apply the 10.2.0.5 Patch Set to Management Agent
After preparing the response file agent_patchset.rsp, apply the 10.2.0.5 patch set to the Oracle home directory of the Management Agent. For the purpose of this article, the Oracle home directory of the Management Agent is /u01/app/oracle/product/agent10g.
[root@oemprod ~]# su - oracle

[oracle@oemprod ~]$ . oraenv
ORACLE_SID = [oms10g] ? agent10g
The Oracle base for ORACLE_HOME=/u01/app/oracle/product/agent10g is /u01/app/oracle

[oracle@oemprod ~]$ cd /home/oracle/software/grid_control/oem_r5/3731593/Disk1

[oracle@oemprod Disk1]$ ./runInstaller -noconfig -silent \
-responseFile /home/oracle/software/grid_control/oem_r5/3731593/Disk1/response/agent_patchset.rsp

At the end of the installation process, verify there were no errors in the installActions.log log file which can be found in the oraInventory/logs directory. The log file will have a later timestamp than the log files created for the Grid Control base installation. For example:
/u01/app/oraInventory/logs/installActions2009-05-03_02-33-07PM.log
Next, log in as the root user in a new command session and run the root.sh script when prompted by the installer.
[root@oemprod ~]# /u01/app/oracle/product/agent10g/root.sh
Finished product-specific root actions.

Install Enterprise Manager 10g Grid Control Release 5 (Management Agent) Screen Output...

________________________________________
Configure Grid Control Installation using ConfigureGC.pl
At this point, all of the software required for Oracle Enterprise Manager 10g Grid Control Release 5 has been installed and linked. The final major step is to configure the Grid Control installation using the Perl script ConfigureGC.pl. The ConfigureGC.pl Perl script was included as part of the Oracle Management Service (OMS) install.
Verify 'execute' Permissions on runConfig.sh
0000000000 /u01/app/oracle/OracleHomes/oms10g/oui/bin/runConfig.sh
Make certain that the $ORACLE_BASE/product/oms10g/oui/bin/runConfig.sh script has 'execute' permissions:
[oracle@oemprod ~]$ ls -l $ORACLE_BASE/product/oms10g/oui/bin/runConfig.sh
-rwxrwxr-x 1 oracle oinstall 1159 May 3 13:51 /u01/app/oracle/product/oms10g/oui/bin/runConfig.sh*

Set PERL5LIB Environment Variable
The PERL5LIB environment variable will need to be set before running the ConfigureGC.pl configure script. Before assigning the environment variable, back up its current value (if any):
[oracle@oemprod ~]$ export PERL5LIB_BACKUP=$PERL5LIB
Next, assign the PERL5LIB environment variable to the Perl modules found in the OMS home directory:
[oracle@oemprod ~]$ export PERL5LIB=$ORACLE_BASE/product/oms10g/perl/lib/5.6.1
$ORACLE_BASE/OracleHomes/oms10g/perl/lib/5.6.1

Run ConfigureGC.pl
Finally, run the ConfigureGC.pl script to configure the Grid Control installation. The formal syntax is:
$ORACLE_OMS_HOME/perl/bin/perl $ORACLE_OMS_HOME/sysman/install/ConfigureGC.pl
Verify your environment is set for OMS and run the ConfigureGC.pl script:
[oracle@oemprod ~]$ echo $ORACLE_HOME
/u01/app/oracle/product/oms10g

[oracle@oemprod ~]$ echo $PERL5LIB
/u01/app/oracle/product/oms10g/perl/lib/5.6.1

[oracle@oemprod ~]$ $ORACLE_HOME/perl/bin/perl $ORACLE_HOME/sysman/install/ConfigureGC.pl /u01/app/oracle/product


$ORACLE_HOME/perl/bin/perl $ORACLE_HOME/sysman/install/ConfigureGC.pl /u01/app/oracle/OracleHomes
After starting the configuration script, a number of log files will begin populating the $ORACLE_HOME/cfgtoollogs/cfgfw/ directory with the results of each configuration action.
The configuration process may take an hour or more to run with very little output at times (except for the likely Oracle Bug that halts the script!). It may be helpful to tail the log files listed below to follow the progress of the configuration:
$ORACLE_HOME/cfgtoollogs/cfgfw/CfmLogger_.log - (OMS configuration assistant's details)
$ORACLE_HOME/sysman/log/emrepmgr* - (Repository upgrade process
ConfigureGC.pl Reports - Invalid Username/Password.
Metalink Doc ID: 602750.1
Bug: 7137054
Within 5 - 10 minutes of running the ConfigureGC.pl script, it will eventually issue a failure message indicating to look in the $ORACLE_HOME/cfgtoollogs/oui/configActions.log log file for errors. Don't bother. The only message written to this log is utterly useless:
The plug-in OMS Configuration has failed its perform method
The two files listed below, on the other hand, will both show the Oracle error code ORA-01017:
$ORACLE_HOME/cfgtoollogs/cfgfw/CfmLogger_.log
$ORACLE_HOME/cfgtoollogs/cfgfw/emca_repos_drop_OUT.log
For example:
Getting temporary tablespace from database...
Could not connect to SYS/(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)
(HOST=oemprod.idevelopment.info)(PORT=1521)))(CONNECT_DATA=(SID=emrep))):
ORA-01017: invalid username/password; logon denied (DBD ERROR: OCISessionBegin)
Solution
To work around this bug, log in to the management repository as either SYS or SYSTEM to change the SYS password to "default":
[oracle@oemprod ~]$ sqlplus sys/emgc10g@emrep as sysdba

SQL> alter user sys identified by "default";
After changing the SYS password to "default", run the ConfigureGC.pl again using same syntax. The configuration will pick up where it left off, so repository configuration will be successful, the base OMS configuration will complete, the management agent configuration will complete and the patch set configuration actions will start.
[oracle@oemprod ~]$ $ORACLE_HOME/perl/bin/perl \
$ORACLE_HOME/sysman/install/ConfigureGC.pl /u01/app/oracle/product
Second Failure
So, you thought you seen the last of Oracle Bug 7137054? Not quite. The configuration will fail yet again and indicate to look in the new $ORACLE_HOME/cfgtoollogs/oui/configActions.log log file for errors. This log file is just as useless as it was the first time. Further examining the $ORACLE_HOME/cfgtoollogs/cfgfw/CfmLogger_.log will show the same ORA-01017 error.
To work around this second error, log in to the management repository database (again) to change the SYS password back to its original value configured in the em_using_existing_db.rsp response file:
[oracle@oemprod ~]$ sqlplus sys/default@emrep as sysdba

SQL> alter user sys identified by oracle123;
Run the configuration script for a third time, repeating the same syntax as before:
[oracle@oemprod ~]$ $ORACLE_HOME/perl/bin/perl \
$ORACLE_HOME/sysman/install/ConfigureGC.pl /u01/app/oracle/product


The configuration script should now finish successfully. The screen output from a successful configuration should be similar to the following:
perform - mode finished for action: patchsetConfigure

You can see the log file: /u01/app/oracle/product/oms10g/cfgtoollogs/oui/configActions2009-05-03_07-51-02-PM.log

10.2.0.5 OMS patch configuration done

Configure Enterprise Manager 10g Grid Control Release 5 Screen Output...

________________________________________
Verify Grid Control Configuration
After successfully installing and configuring Enterprise Manager Grid Control, verify the OMS, Application Server, and Management Agent components using the steps described in this section.
OPMN Processes
Open a terminal session to the Grid Control server, log in as the oracle user account, set the environment to the OMS Oracle home, and check the OPMN processes:
[oracle@oemprod ~]$ . oraenv
ORACLE_SID = [oms10g] ? oms10g
The Oracle base for ORACLE_HOME=/u01/app/oracle/product/oms10g is /u01/app/oracle

[oracle@oemprod ~]$ $ORACLE_HOME/opmn/bin/opmnctl status

Processes in Instance: EnterpriseManager0.oemprod
-------------------+--------------------+---------+---------
ias-component | process-type | pid | status
-------------------+--------------------+---------+---------
DSA | DSA | N/A | Down
HTTP_Server | HTTP_Server | 7672 | Alive
LogLoader | logloaderd | N/A | Down
dcm-daemon | dcm-daemon | N/A | Down
OC4J | home | 7673 | Alive
OC4J | OC4J_EMPROV | 7674 | Alive
OC4J | OC4J_EM | 7676 | Alive
WebCache | WebCache | 7697 | Alive
WebCache | WebCacheAdmin | 7686 | Alive
Everything here looks good!

Grid Control Console
My guess is that the second test you will want to perform is to bring up the Grid Control Console. Open a web browser and use the URL:
http://:4889/em/
For example,
http://oemprod:4889/em/



Verify 10.2.0.5 Component Version for OMS
To verify the version of the OMS component, use either emctl from the OMS Oracle home or click the "About Oracle Enterprise Manager" link in the Grid Control Console:
[oracle@oemprod ~]$ $ORACLE_HOME/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.



Verify 10.2.0.5 Component Version for Management Agent
To verify the version of the Management Agent component, use either emctl from the Management Agent Oracle home or click "[Setup] --> [Agents]" in the Grid Control Console:
[oracle@oemprod ~]$ . oraenv
ORACLE_SID = [oms10g] ? agent10g
The Oracle base for ORACLE_HOME=/u01/app/oracle/product/agent10g is /u01/app/oracle

[oracle@oemprod ~]$ $ORACLE_HOME/bin/emctl status agent
Oracle Enterprise Manager 10g Release 5 Grid Control 10.2.0.5.0.
Copyright (c) 1996, 2009 Oracle Corporation. All rights reserved.
---------------------------------------------------------------
Agent Version : 10.2.0.5.0
OMS Version : 10.2.0.5.0
Protocol Version : 10.2.0.5.0
Agent Home : /u01/app/oracle/product/agent10g
Agent binaries : /u01/app/oracle/product/agent10g
Agent Process ID : 28110
Parent Process ID : 28094
Agent URL : https://oemprod:3872/emd/main/
Repository URL : https://oemprod:1159/em/upload
Started at : 2009-05-03 19:24:20
Started by user : oracle
Last Reload : 2009-05-03 20:27:23
Last successful upload : 2009-05-03 21:39:20
Total Megabytes of XML files uploaded so far : 16.76
Number of XML files pending upload : 0
Size of XML files pending upload(MB) : 0.00
Available disk space on upload filesystem : 46.29%
Last successful heartbeat to OMS : 2009-05-03 21:48:27
---------------------------------------------------------------
Agent is Running and Ready





________________________________________
Secure the OMS
After the 10.2.0.5 install and configuration, access to Grid Control is unsecured by default:
[oracle@oemprod ~]$ emctl status emkey
Oracle Enterprise Manager 10g Release 5 Grid Control
Copyright (c) 1996, 2009 Oracle Corporation. All rights reserved.
Please enter repository password: xxxxxxx

The Em Key is configured properly, but is not secure.
Secure the Em Key by running "emctl config emkey -remove_from_repos".

Secure OMS
Use the following to secure the OMS:
[oracle@oemprod ~]$ . oraenv
ORACLE_SID = [oms10g] ? oms10g
The Oracle base for ORACLE_HOME=/u01/app/oracle/product/oms10g is /u01/app/oracle

[oracle@oemprod ~]$ emctl config emkey -remove_from_repos
Oracle Enterprise Manager 10g Release 5 Grid Control
Copyright (c) 1996, 2009 Oracle Corporation. All rights reserved.
Please enter repository password: xxxxxxx

The Em Key has been removed from the Management Repository.
Make a backup copy of OH/sysman/config/emkey.ora file and store it on another machine.
WARNING: Encrypted data in Enterprise Manager will become unusable if the emkey.ora file is lost or corrupted.
[oracle@oemprod ~]$ emctl status emkey
Oracle Enterprise Manager 10g Release 5 Grid Control
Copyright (c) 1996, 2009 Oracle Corporation. All rights reserved.
Please enter repository password: xxxxxxx

The Em Key is configured properly.

Secure the Management Agent
Use the following to secure the Management Agent:
[oracle@oemprod log]$ . oraenv
ORACLE_SID = [oms10g] ? agent10g
The Oracle base for ORACLE_HOME=/u01/app/oracle/product/agent10g is /u01/app/oracle

[oracle@oemprod ~]$ emctl stop agent
Oracle Enterprise Manager 10g Release 5 Grid Control 10.2.0.5.0.
Copyright (c) 1996, 2009 Oracle Corporation. All rights reserved.
Stopping agent ... stopped.

[oracle@oemprod ~]$ emctl secure agent
Oracle Enterprise Manager 10g Release 5 Grid Control 10.2.0.5.0.
Copyright (c) 1996, 2009 Oracle Corporation. All rights reserved.
Agent is already stopped... Done.
Securing agent... Started.
Enter Agent Registration Password : xxxxxx
Securing agent... Successful.

[oracle@oemprod ~]$ emctl start agent
Oracle Enterprise Manager 10g Release 5 Grid Control 10.2.0.5.0.
Copyright (c) 1996, 2009 Oracle Corporation. All rights reserved.
Starting agent ........... started.
[oracle@oemprod ~]$ emctl upload agent
Oracle Enterprise Manager 10g Release 5 Grid Control 10.2.0.5.0.
Copyright (c) 1996, 2009 Oracle Corporation. All rights reserved.
---------------------------------------------------------------
EMD upload completed successfully

[oracle@oemprod ~]$ emctl status agent
Oracle Enterprise Manager 10g Release 5 Grid Control 10.2.0.5.0.
Copyright (c) 1996, 2009 Oracle Corporation. All rights reserved.
---------------------------------------------------------------
Agent Version : 10.2.0.5.0
OMS Version : 10.2.0.5.0
Protocol Version : 10.2.0.5.0
Agent Home : /u01/app/oracle/product/agent10g
Agent binaries : /u01/app/oracle/product/agent10g
Agent Process ID : 29170
Parent Process ID : 29154
Agent URL : https://oemprod:3872/emd/main/
Repository URL : https://oemprod:1159/em/upload
Started at : 2009-05-11 09:16:33
Started by user : oracle
Last Reload : 2009-05-11 09:16:33
Last successful upload : 2009-05-11 09:17:35
Total Megabytes of XML files uploaded so far : 0.32
Number of XML files pending upload : 0
Size of XML files pending upload(MB) : 0.00
Available disk space on upload filesystem : 45.18%
Last successful heartbeat to OMS : 2009-05-11 09:17:44
---------------------------------------------------------------
Agent is Running and Ready

________________________________________
Starting / Stopping the Grid Control Environment
Stopping Grid Control
Management Agent
[oracle@oemprod ~]$ . oraenv
ORACLE_SID = [oms10g] ? agent10g
The Oracle base for ORACLE_HOME=/u01/app/oracle/product/agent10g is /u01/app/oracle

[oracle@oemprod ~]$ emctl stop agent
Oracle Enterprise Manager 10g Release 5 Grid Control 10.2.0.5.0.
Copyright (c) 1996, 2009 Oracle Corporation. All rights reserved.
Stopping agent ... stopped.
Oracle Management Service (OMS)
[oracle@oemprod ~]$ . oraenv
ORACLE_SID = [agent10g] ? oms10g
The Oracle base for ORACLE_HOME=/u01/app/oracle/product/oms10g is /u01/app/oracle

[oracle@oemprod ~]$ $ORACLE_HOME/opmn/bin/opmnctl stopall
opmnctl: stopping opmn and all managed processes...
Database Repository
[oracle@oemprod ~]$ . oraenv
ORACLE_SID = [oms10g] ? emrep
The Oracle base for ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1 is /u01/app/oracle

[oracle@oemprod ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.1.0.7.0 - Production on Mon May 4 00:07:27 2009

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


Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - Production
With the Partitioning, Oracle Label Security, OLAP, Data Mining,
Oracle Database Vault and Real Application Testing options

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - Production
With the Partitioning, Oracle Label Security, OLAP, Data Mining,
Oracle Database Vault and Real Application Testing options

[oracle@oemprod ~]$ lsnrctl stop

LSNRCTL for Linux: Version 11.1.0.7.0 - Production on 04-MAY-2009 00:12:26

Copyright (c) 1991, 2008, Oracle. All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=oemprod)(PORT=1521)))
The command completed successfully

Starting Grid Control
Database Repository
[oracle@oemprod ~]$ . oraenv
ORACLE_SID = [emrep] ? emrep
The Oracle base for ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1 is /u01/app/oracle

[oracle@oemprod ~]$ lsnrctl start

LSNRCTL for Linux: Version 11.1.0.7.0 - Production on 04-MAY-2009 00:16:42

Copyright (c) 1991, 2008, Oracle. All rights reserved.

Starting /u01/app/oracle/product/11.1.0/db_1/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 11.1.0.7.0 - Production
System parameter file is /u01/app/oracle/product/11.1.0/db_1/network/admin/listener.ora
Log messages written to /u01/app/oracle/diag/tnslsnr/oemprod/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=oemprod)(PORT=1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=oemprod)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.1.0.7.0 - Production
Start Date 04-MAY-2009 00:16:42
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/11.1.0/db_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/oemprod/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=oemprod)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
The listener supports no services
The command completed successfully

[oracle@oemprod ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.1.0.7.0 - Production on Mon May 4 00:16:48 2009

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

Connected to an idle instance.

SQL> startup
ORACLE instance started.

Total System Global Area 1058779136 bytes
Fixed Size 1318084 bytes
Variable Size 545260348 bytes
Database Buffers 507510784 bytes
Redo Buffers 4689920 bytes
Database mounted.
Database opened.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - Production
With the Partitioning, Oracle Label Security, OLAP, Data Mining,
Oracle Database Vault and Real Application Testing options
Oracle Management Service (OMS)
[oracle@oemprod ~]$ . oraenv
ORACLE_SID = [emrep] ? oms10g
The Oracle base for ORACLE_HOME=/u01/app/oracle/product/oms10g is /u01/app/oracle

[oracle@oemprod ~]$ $ORACLE_HOME/opmn/bin/opmnctl startall
opmnctl: starting opmn and all managed processes...
Management Agent
[oracle@oemprod ~]$ . oraenv
ORACLE_SID = [oms10g] ? agent10g
The Oracle base for ORACLE_HOME=/u01/app/oracle/product/agent10g is /u01/app/oracle

[oracle@oemprod ~]$ emctl start agent
Oracle Enterprise Manager 10g Release 5 Grid Control 10.2.0.5.0.
Copyright (c) 1996, 2009 Oracle Corporation. All rights reserved.
Starting agent ........... started.

________________________________________
Installing Grid Control Management Agent (10.2.0.5)
At this point, Oracle Enterprise Manager 10g Grid Control Release 5 (10.2.0.5) for Linux x86 should be up and running. The environment described in this document installed and configured all three Grid Control components on a single Linux server:
• Oracle Management Service
• Oracle Database (the OEM repository)
• Oracle Management Agent
The next logical step is to install and configure the Oracle Management Agent on all of the nodes to be managed and monitored by Grid Control. Oracle Management Agent is one of the integral components of the Enterprise Manager Grid Control architecture. Management Agent will discover, monitor and administer all targets on their hosts, including databases, application servers, other software, and aspects of the hosts themselves. Management Agent communicates with the monitored targets, collects information about their health and performances, transports that information to Oracle Management Service (OMS), which in turn stores the collected details in the central repository created in the Oracle database.
The following document describes the steps to install Oracle Management Agent (10.2.0.5) on a node running an Oracle database which will be monitored by the central Grid Control environment created in this article:
Installing Grid Control Management Agent (10.2.0.5)

________________________________________
About the Author
Jeffrey Hunter is an Oracle Certified Professional, Java Development Certified Professional, Author, and currently works as a Senior Database Administrator for The DBA Zone, Inc.. His work includes advanced performance tuning, Java and PL/SQL programming, capacity planning, database security, and physical / logical database design in a UNIX, Linux, and Windows server environment. Jeff's other interests include mathematical encryption theory, programming language processors (compilers and interpreters) in Java and C, LDAP, writing web-based database administration tools, and of course Linux. He has been a Sr. Database Administrator and Software Engineer for over 15 years and maintains his own website site at: http://www.iDevelopment.info. Jeff graduated from Stanislaus State University in Turlock, California, with a Bachelor's degree in Computer Science.






Download from http://oss.oracle.com/projects/yast/files/el5/i386/
tar -xvf yast_el5_x86_32.tar
sh install.sh

http://oemprod.asiacell.com:4889/em/console/home

cd /media/RHEL_5.2\ i386\ DVD/Server/
> ll perl-Digest*
> rpm -ivh perl-Digest-SHA1-2.11-1.2.1.i386.rpm


Starting and Stopping Agent Services
The following commands can be used to start and stop the agent:

# Start Agent
/u01/app/oracle/product/10.1.0/agent/bin/emctl start agent

# Stop Agent
/u01/app/oracle/product/10.1.0/agent/bin/emctl stop agent