Sun Microsystems, Inc.  Sun System Handbook - ISO 4.1 October 2012 Internal/Partner Edition
   Home | Current Systems | Former STK Products | EOL Systems | Components | General Info | Search | Feedback

Asset ID: 1-72-1453154.1
Update Date:2012-05-22
Keywords:

Solution Type  Problem Resolution Sure

Solution  1453154.1 :   DBUA (DataBase Upgrade Assistant) failing with "Cannot find the ORACLE_HOME for the database" on ODA (Oracle Database Appliance)  


Related Items
  • Oracle Database Appliance
  •  
  • Oracle Appliance Kit
  •  
Related Categories
  • PLA-Support>Database Technology>Engineered Systems>Oracle Database Appliance>DB: ODA_EST
  •  
  • .Old GCS Categories>ST>Server>Engineered Systems>Oracle Database Appliance>Troubleshooting and Debugging
  •  
  • .Old GCS Categories>ST>Server>Engineered Systems>Oracle Database Appliance>Patching
  •  




In this Document
Symptoms
Changes
Cause
Solution
References


Applies to:

Oracle Appliance Kit - Version 2.2.0.0 and later
Oracle Database Appliance - Version Not Applicable and later
Information in this document applies to any platform.

Symptoms

*Symptoms
Briefly describe the symptoms of the problem. Remember to delete any customer specific information

On ODA (Oracle Database Appliance) upgrading a database doing

./oakcli update -patch 2.2.0.0.0 --database RAC


The "/u01/app/oracle/cfgtoollogs/dbua/logs/silent.log" shows the following
error:

~~~~~~~~~~~~~~~~~
Cannot find the ORACLE_HOME for the database "rac"
Could not connect to the database with the available OracleHome and OracleSid
parameters
Could not proceed with Upgrade due to errors.
Fix the errors and restart again!
~~~~~~~~~~~~~~~~~


Trying to upgrade the database from 11.2.0.2.x to 11.2.0.3.2, by issuing

oakcli update -patch 2.2.0.0.0 --database RAC
or
oakcli update -patch 2.2.0.0.0 --database rac

Both will fail. 



If the database was not upgraded, we are getting the following errors

ERROR  : Ran '/bin/su oracle -c "/u01/app/oracle/product/11.2.0.3/dbhome_1/bin/dbua -silent -keepHiddenParams -dbName rac"' and it returned code(1) and output is:
        Check the log file "/u01/app/oracle/cfgtoollogs/dbua/logs/silent.log" for upgrade details.
:
cat  u01/app/oracle/cfgtoollogs/dbua/logs/silent.log":

Cannot find the ORACLE_HOME for the database "rac"
Could not connect to the database with the available OracleHome and OracleSid parameters
Could not proceed with Upgrade due to errors.
Fix the errors and restart again!


trace.log showed:

[main] [ 2012-04-25 10:31:25.106 CEST ] [OCR.keyExists:692]  OCR.keyExists(DATABASE.DATABASES.rac)
[main] [ 2012-04-25 10:31:25.110 CEST ] [OCR.keyExists:692]  OCR.keyExists(DATABASE.DATABASES.rac)
[main] [ 2012-04-25 10:31:25.112 CEST ] [OCRTree.isDatabaseConfigured:721]  Releasing shared CSS lock SRVM.DATABASE.DATABASES
[main] [ 2012-04-25 10:31:25.116 CEST ] [CompManager.lookupOCRForRacDB:1341]  Failed to load db. DB is not in OCR
[main] [ 2012-04-25 10:31:25.116 CEST ] [HAUtils.getCurrentOracleHome:366]  Oracle home from system property: /u01/app/oracle/product/11.2.0.3/dbhome_1
[main] [ 2012-04-25 10:31:25.117 CEST ] [GETCRSHOMEUtil.<init>:90]  Toolname: getcrshome   ---    Tool location: /u01/app/oracle/product/11.2.0.3/dbhome_1/srvm/adminTool dependencies: [Ljava.lang.String;@77f297e7
[Thread-22] [ 2012-04-25 10:31:25.119 CEST ] [StreamReader.run:61]  In StreamReader.run
[Thread-21] [ 2012-04-25 10:31:25.126 CEST ] [StreamReader.run:61]  In StreamReader.run
[Thread-21] [ 2012-04-25 10:31:25.128 CEST ] [StreamReader.run:65]  OUTPUT>/u01/app/11.2.0.3/grid
[main] [ 2012-04-25 10:31:25.128 CEST ] [HAUtils.getConfiguredGridHome:783]  Configured Grid Infrastructure home: /u01/app/11.2.0.3/grid
[Thread-24] [ 2012-04-25 10:31:25.144 CEST ] [StreamReader.run:61]  In StreamReader.run
[Thread-23] [ 2012-04-25 10:31:25.144 CEST ] [StreamReader.run:61]  In StreamReader.run
[Thread-23] [ 2012-04-25 10:31:25.190 CEST ] [StreamReader.run:65]  OUTPUT>CRS-4003: Resource 'ora.rac.db' is registered.
[main] [ 2012-04-25 10:31:25.340 CEST ] [DatabaseFactoryImpl.getDatabaseVersion:657]  version =11.2.0.2.0
[main] [ 2012-04-25 10:31:25.341 CEST ] [Version$VersionEnum.getEnumMember:196]  Version Match Successful: returning version object 11.2.0.2
[main] [ 2012-04-25 10:31:25.344 CEST ] [Version.isPre:528]  version to be checked 11.2.0.2.0 major version to check against11
[main] [ 2012-04-25 10:31:25.344 CEST ] [Version.isPre:539]  isPre.java: Returning FALSE
[main] [ 2012-04-25 10:31:25.345 CEST ] [Version.isPre11202:448]  version to be checked 11.2.0.2.0 minor version to check against2, patchset to check against 2
[main] [ 2012-04-25 10:31:25.345 CEST ] [Version.isPre11202:467]  isPre11202 : Returning FALSE for patchset version check
[main] [ 2012-04-25 10:31:25.361 CEST ] [DatabaseFactoryImpl.getDatabase:768]  Checking for version mismatch
[main] [ 2012-04-25 10:31:25.361 CEST ] [DatabaseFactoryImpl.getDatabase:774]  dbVersion4 = 11.2.0.2
[main] [ 2012-04-25 10:31:25.361 CEST ] [DatabaseFactoryImpl.getDatabase:789]  db type SINGLE
[main] [ 2012-04-25 10:31:25.361 CEST ] [Version.isPre:528]  version to be checked 11.2.0.2.0 major version to check against11
[main] [ 2012-04-25 10:31:25.362 CEST ] [Version.isPre:539]  isPre.java: Returning FALSE
[main] [ 2012-04-25 10:31:25.362 CEST ] [Version.isPre112:414]  version to be checked 11.2.0.2.0 minor version to check against2
[main] [ 2012-04-25 10:31:25.362 CEST ] [Version.isPre112:425]  isPre112 : Returning FALSE for minor version check
[main] [ 2012-04-25 10:31:25.362 CEST ] [DatabaseFactoryImpl.getSingleInstanceDatabase:1285]  Getting single instance database for rac
[main] [ 2012-04-25 10:31:25.402 CEST ] [DatabaseImpl.crsResource:3415]  calling parent's crsResource
[main] [ 2012-04-25 10:31:25.465 CEST ] [CompManager.setSelectedDatabase:1444]  setSelectedDatabase::oracleHome=null sid=rac
[main] [ 2012-04-25 10:31:25.466 CEST ] [SilentCompManager.startOperation:332]   Exiting, could not set the database

You may receive the following warning messages:

WARNING: 2012-04-26 00:19:09: Do not find the Database: RAC

Changes

 Upgrading ODA to the Bundle Patch version 2.2.0.0.0

Cause

We are getting the db name from the crs resource name.
We should use DB_UNIQUE_NAME from the resource profile. 

 

if the database name is created with upper case, /etc/oratab will have upper case names:

SI:/u01/app/oracle/product/11.2.0/dbhome_1:N          # line added by Agent
TEST:/u01/app/oracle/product/11.2.0/dbhome_1:N      # line added by Agent
RAC:/u01/app/oracle/product/11.2.0/dbhome_1:N       # line added by Agent


srvctl will have upper case names:

$ srvctl config database -d RAC
Database unique name: RAC
Database name: RAC


The crs resources names were lower case for the dbnames, i.e.:

ora.rac.db
ora.si.db
ora.test.db

crsctl stat res ora.rac.db
NAME=ora.rac.db
TYPE=ora.database.type
TARGET=ONLINE             , ONLINE

Solution

1. As root user to upgrade the oracle home to be 11.2.0.3.2 run:

/opt/oracle/oak/bin/oakcli update -patch 2.2.0.0.0 --database

If 11.2.0.3.2 database software already installed, you will receive the following warning messages:

INFO: No database names are provided. Only Oracle software will be upgraded
INFO: To upgrade the databases you can run 'oakcli update -patch 2.2.0.0.0 -database <db_names>' later
...

you can safely ignore them.


  
2. As oracle user, '. oraenv' to set the environment properly and run the following manually  

/u01/app/oracle/product/11.2.0.3/dbhome_1/bin/dbua -silent -keepHiddenParams -dbName <DB_NAME>

ie:
$ /u01/app/oracle/product/11.2.0.3/dbhome_1/bin/dbua -silent -keepHiddenParams -dbName RAC

 

3. Update your bash_profile: '/home/oracle/.bash_profile'
with the new oracle_home '/u01/app/oracle/product/11.2.0.3/dbhome_1'

References

<BUG:14002683> - DBUA FAILING WITH "CANNOT FIND THE ORACLE_HOME FOR THE DATABASE" ON ODA

Attachments
This solution has no attachment
  Copyright © 2012 Sun Microsystems, Inc.  All rights reserved.
 Feedback