2011-09-21

TRAILLING "/" IN ORACLE_HOME DURING CRS PATCH CAUSING INSTANCE ACCESS ISSUE

Bug 6894855 TRAILLING "/" IN ORACLE_HOME DURING CRS PATCH CAUSING INSTANCE ACCESS ISSUE
After Apply CRS Patch, sqlplus Can not Connect to Instance Started via srvctl [ID 730081.1]

Symptoms

After applying CRS patch, database start up fine via srvctl, but sqlplus '/ as sysdba' report:

    Connected to an idle instance

If starting database using sqlplus, then sqlplus connection is fine.

Changes

Applied CRS merge patch 5980915. Note: this issue can happen for any CRS patch apply if trailing slash "/" is supplied to -dbhome definition.

Cause

During CRS patch apply, trailing slash "/" is appended to ORACLE_HOME via press <Tab> key to fulfill the path at RDBMS patch apply phase, eg:
% custom/server/5980915/custom/scripts/prepatch.sh -dbhome
/u01/oracle/product/10.2.0/db_2/

While the correct command should be:
% custom/server/5980915/custom/scripts/prepatch.sh -dbhome
/u01/oracle/product/10.2.0/db_2

This cause $ORACLE_HOME/bin/racgwrap script carries the trailing "/" for ORACLE_HOME, eg:
ORACLE_HOME=/u01/oracle/product/10.2.0/db_2/
While the correct one should be:
ORACLE_HOME=/u01/oracle/product/10.2.0/db_2

Oracle uses ORACLE_SID and ORACLE_HOME to calculate shared memory segment key for uniquely identifying an instance.

With srvctl start instance/database, it uses enviornment setting in racgwrap script, which causes ORACLE_HOME being set wrongly to /oracle/product/10.2.0/db_2/. This causes sqlplus session with correct ORACLE_HOME connect to an idle instance even though the instance is running.

This is documented in Bug 6894855 TRAILLING "/" IN ORACLE_HOME DURING CRS PATCH CAUSING INSTANCE ACCESS ISSUE


Solution

1. Shutdown all instances via srvctl:
         srvctl stop database -d <dbname>
2. Remove trailing slash "/" from "ORACLE_HOME=" setting in RDBMS  $ORACLE_HOME/bin/racgwrap script
3. Restart all instances via srvctl
         srvctl start database -d <dbname>
4. Test sqlplus / as sysdba

Scalability RAC Community

To discuss this topic further with Oracle experts and industry peers, we encourage you to review, join or start a discussion in the My Oracle Support Scalability RAC Community.

References

BUG:6894855 - TRAILLING "/" IN ORACLE_HOME DURING CRS PATCH CAUSING INSTANCE ACCESS ISSUE

Niciun comentariu:

Trimiteți un comentariu