Shel Script doesn't work from Exceed

Hi,

I am using this script to load up my Oracle Databases, but when I log in through Exceed, it hangs. Can anyone tell me what else I need to add to make this work??

Details

****************************************************************************************************

# Environment Variables for Oracle 92

export ORACLE_BASE=/oracle
export ORACLE_HOME=/oracle/92
PATH=$ORACLE_HOME/bin:$ORACLE_HOME/Apache/Apache/bin:$PATH
export ORACLE_OWNER=oracle
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
export PATH=$ORACLE_HOME/bin:$PATH

# Oracle Environment SID Selector
# Script to select From the Multiple SIDs on this machine

echo "The following SIDs reside on this Box"
cat /var/opt/oracle/oratab | awk -F: '{print $1}' | grep -v "#"
ORAENV_ASK="YES"
. /usr/local/bin/oraenv

****************************************************************************************************

This other one , when I try it as a .profile, it logs me out straightaway.

*********************************************************************************************

echo
echo " Welcome Oracle User! "
echo " DATABASES INFORMATION"
echo " ===================== "
echo "Author: Derek Nkansah"
echo
echo
echo "*** Please note that Summit Databases are case-sensitive. Please adhere to those ***"
echo
echo
echo "WHICH INSTANCE DO YOU WANT TO USE (ORACLE9i or ORACLE8i)"
echo "PLEASE CHOOSE ONE:\c"
read v_instance
if [ -z "$v_instance" ]
then
echo "You must choose one of the instances above."
echo "Null value is not allowed."
exit 99

   fi

echo

   if [ "$v_instance" = ORACLE9i ]
         then

               echo  "Your choice is Oracle9i"
               echo  "The database for the Oracle 9i are:\(loncli92, londev92, londqa, londft92\)"
           echo " Please enter the database you want to use : \\c"
                  read ORACLE_SID
                  export ORACLE_SID


           fi


          if [ "$v_instance" = ORACLE8i ]
       then

              echo "Your choice is Oracle8i"
              echo "The database for the Oracle8i are:\( loncu817, londv817, lonqa817, lonft817\)"
              echo " Please enter the database you want to use : \\c"
                     read ORACLE_SID
                     export ORACLE_SID

         fi

# The statements below get the oracle home for the given Database.

ORACLE_HOME=`cat /var/opt/oracle/oratab|grep ${ORACLE_SID}:|cut -f2 -d':'`
export ORACLE_HOME
export PATH=$ORACLE_HOME/bin:$PATH
# /usr/ucb/

ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
export ORA_NLS33

LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export LD_LIBRARY_PATH

echo " Your database choice is : $ORACLE_SID"
echo " The ORACLE_HOME for this database is: $ORACLE_HOME "

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

Please help me

Deln

:frowning:

export PATH=$ORACLE_HOME/bin:$PATH

Try changing this line to:
export PATH=$PATH:$ORACLE_HOME/bin

Doesn't help. It is failing on this one line;

. /usr/local/bin/oraenv

Nothing to do with the path change.

Ta,

Deln

Are you missing an argument to the program oraenv? Possibly the schema ID?

I am sorry, I don't understand your question. I am really stuck and need ideas, can you please help??

Deln

In the environment that I work in, when sourcing Oracle variables we must pass the ORACLE_SID value.

Example: Where testServer is the Oracle Schema name.

. /usr/local/bin/oraenv testServer

Ritchie, How am I meant to do this with the several Oracle SIDs?? I have 20 of these on a couple of boxes. How do I pass this to it??

Many thanks,

Derek

First, did passing the schema name correct your problem? If so, you will need to capture this information in some manner. We too have many instances, the environment is setup in such a way that there is an environment file for Oracle, much like you have already defined, and a variable gets set depending on the system [instance of oracle] the user is attempting to access, this variable is passed to the oraenv program.

Please send me copy of your script which you use in your environment.

Thanks

Unfortunately I cannot. Propietary to the client I work for. You never answered whether passing the SID to oraenv actually corrected the problem you are having.

I am going to try this and let you know in 5.

Derek

Sorry, this didn't work.....

Derek