Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: oraenv and ASM instance

RE: oraenv and ASM instance

From: Hallas, John (EXP N-ARM) <john.hallas_at_lmco.com>
Date: Fri, 10 Aug 2007 16:11:58 +0100
Message-id: <4C623E38629BDA469E90D1FF271309E9106FF454@emss51m09.uk.lmco.com>


Metalink note 338441.1 refers

To summarise - a known bug (in 10.1)

Fix -

Edit dbhome and change the following block of code:

Change:

case "$ORASID" in

    NOTSET)     # ORACLE_SID not passed in and not in environment
                RET=2
                ORAHOME="$ORACLE_HOME" ;;

    *)  # ORACLE_SID was set or provided on the command line
        if test -f $ORATAB ; then

# Try for a match on ORASID in oratab
# NULL SID is * in oratab
case "$ORASID" in "") ORASID='\*' ;; esac ORAHOME=`awk -F: "/^${ORASID}:/ {print \\$2; exit}"\ $ORATAB 2>/dev/null` fi ;;

esac

To:

 case "$ORASID" in

    NOTSET)     # ORACLE_SID not passed in and not in environment
                RET=2
                ORAHOME="$ORACLE_HOME" ;;

    *)  # ORACLE_SID was set or provided on the command line
        if test -f $ORATAB ; then

# Try for a match on ORASID in oratab
# NULL SID is * in oratab
case "$ORASID" in "") ORASID='\*' ;; esac if [ $ORASID = "+ASM" ] ; then ORAHOME=`awk -F: "/^\+ASM:/ {print \\$2; exit}" $ORATAB 2>/dev/null` else ORAHOME=`awk -F: "/^${ORASID}:/ {print \\$2; exit}"\ $ORATAB 2>/dev/null` fi fi ;;

esac  

-----Original Message-----
From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org] On Behalf Of S. Anthony Sequeira Sent: 10 August 2007 14:16
To: oracle-l_at_freelists.org
Subject: oraenv and ASM instance

Hi,

Something that has been bothering me for a while. I know it's no biggie, just a bit of a pain.

I cannot use oraenv to change the default instance to the +ASM instance, I haven't the time to go through and fix the script, just wondering whether anyone has done so.

$ cat /var/opt/oracle/oratab
+ASM:/u01/app/oracle/product/10.2.0/ASM:Y testbed:/u01/app/oracle/product/10.2.0/Db_1:Y mpnfdb:/u01/app/oracle/product/8.1.7:N
*:/u01/app/oracle/product/9.2.0:N
$ . oraenv
ORACLE_SID = [tsequeira] ? +ASM
ORACLE_HOME = [/export/home/oracle] ?
$ . oraenv
ORACLE_SID = [+ASM] ? '+ASM'
ORACLE_HOME = [/export/home/oracle] ?
$ . oraenv
ORACLE_SID = ['+ASM'] ? "+ASM"
ORACLE_HOME = [/export/home/oracle] ?
$ . oraenv
ORACLE_SID = ["+ASM"] ? \+ASM
ORACLE_HOME = [/export/home/oracle] ?
$

-- 
Tony

--
http://www.freelists.org/webpage/oracle-l


--
http://www.freelists.org/webpage/oracle-l
Received on Fri Aug 10 2007 - 10:11:58 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US