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

Home -> Community -> Usenet -> c.d.o.server -> Re: ORA-01034 and ORA-01034, if starting oracle from script

Re: ORA-01034 and ORA-01034, if starting oracle from script

From: Joel Garry <joel-garry_at_home.com>
Date: 7 Jul 2004 17:14:01 -0700
Message-ID: <91884734.0407071614.6fe9eff3@posting.google.com>


chico_at_grumly.info (cyril) wrote in message news:<3123d61c.0407070701.68cc673_at_posting.google.com>...
> Hi,
>
> I am building a cluster with oracle. My cluster (Redhat cluster suite)
> needs scripts in order to start and stop oracle.
>
> My problem is these 2 errors when I'm trying to stop my oracle service
> (if I call the stopdb script from a shell):
> ORA-01034: ORACLE not available
> ORA-01034: shared memory realm does not exist

That error is normally bad ORA* environment variables. Try echoing them from the scripts, ls $ORACLE_HOME after setting it, maybe something not-so-obvious is happening. Are you logged in in the dba group? running su - oracle rather than root?

I can't say that shutdown abort is very tidy.

Hmmmm, you don't export ORACLE_RELEASE.

>
> My environment variable are correctly set. I'm really searching from a
> long time witout succes. (But I'm a newbie in oracle).
>
> An other thing I have tried :
> Start the database from my script (as oracle user). Start sqlplus and
> try to stop the database (shutdown). I Still got the same errors.
>
> I'm working with Oracle 9.2 on RedHat ES 3.
>
> Thanks a lot.
>
> PS : Here I give you my scripts (from the redhat documentation :
> http://www.redhat.com/docs/manuals/enterprise/RHEL-3-Manual/cluster-suite/ch-db-service.html#S1-SERVICE-ORACLE)
>
> ------------- Start the database ---------------
> #!/bin/sh
> #
>
> #
> # Script to start the Oracle Database Server instance.
> #
> ########################################################################
> #
> # ORACLE_RELEASE
> #
> # Specifies the Oracle product release.
> #
> ########################################################################
>
> ORACLE_RELEASE=9.2.0
>
> ########################################################################
> #
> # ORACLE_SID
> #
> # Specifies the Oracle system identifier or "sid", which is the name
> of
> # the Oracle Server instance.
> #
> ########################################################################
>
> export ORACLE_SID=TEST
>
> ########################################################################
> #
> # ORACLE_BASE
> #
> # Specifies the directory at the top of the Oracle software product
> and
> # administrative file structure.
> #
> ########################################################################
>
> export ORACLE_BASE=/u01/app/oracle
>
> ########################################################################
> #
> # ORACLE_HOME
> #
> # Specifies the directory containing the software for a given release.
> # The Oracle recommended value is $ORACLE_BASE/product/<release>
> #
> ########################################################################
>
> export ORACLE_HOME=/u01/app/oracle/product/${ORACLE_RELEASE}
>
> ########################################################################
> #
> # LD_LIBRARY_PATH
> #
> # Required when using Oracle products that use shared libraries.
> #
> ########################################################################
>
> export LD_LIBRARY_PATH=${ORACLE_HOME}/lib:$LD_LIBRARY_PATH
>
> ########################################################################
> #
> # PATH
> #
> # Verify that the users search path includes $ORACLE_HOME/bin
> #
> ########################################################################
>
> export PATH=$PATH:${ORACLE_HOME}/bin
>
> ########################################################################
> #
> # This does the actual work.
> #
> # Start the Oracle Server instance based on the initSID.ora
> # initialization parameters file specified.
> #
> ########################################################################
>
> /u01/app/oracle/product/9.2.0/bin/sqlplus << EOF
> sys as sysdba
> spool /home/oracle/startdb.log
> startup pfile = /u01/app/oracle/product/9.2.0/admin/test/scripts/init.ora
> open;
> spool off
> quit;
> EOF
>
> exit
>
> ------------------------ Stop the database ---------------
>
> #!/bin/sh
> #
> #
> # Script to STOP the Oracle Database Server instance.
> #
> ######################################################################
> #
> # ORACLE_RELEASE
> #
> # Specifies the Oracle product release.
> #
> ######################################################################
>
> ORACLE_RELEASE=9.2.0
>
> ######################################################################
> #
> # ORACLE_SID
> #
> # Specifies the Oracle system identifier or "sid", which is the name
> # of the Oracle Server instance.
> #
> ######################################################################
>
> export ORACLE_SID=TEST
>
> ######################################################################
> #
> # ORACLE_BASE
> #
> # Specifies the directory at the top of the Oracle software product
> # and administrative file structure.
> #
> ######################################################################
>
> export ORACLE_BASE=/u01/app/oracle
>
> ######################################################################
> #
> # ORACLE_HOME
> #
> # Specifies the directory containing the software for a given release.
> # The Oracle recommended value is $ORACLE_BASE/product/<release>
> #
> ######################################################################
>
> export ORACLE_HOME=/u01/app/oracle/product/${ORACLE_RELEASE}
>
> ######################################################################
> #
> # LD_LIBRARY_PATH
> #
> # Required when using Oracle products that use shared libraries.
> #
> ######################################################################
>
> export LD_LIBRARY_PATH=${ORACLE_HOME}/lib:$LD_LIBRARY_PATH
>
> ######################################################################
> #
> # PATH
> #
> # Verify that the users search path includes $ORACLE_HOME/bin
> #
> ######################################################################
>
> export PATH=$PATH:${ORACLE_HOME}/bin
>
> ######################################################################
> #
> # This does the actual work.
> #
> # STOP the Oracle Server instance in a tidy fashion.
> #
> ######################################################################
>
> /u01/app/oracle/product/9.2.0/bin/sqlplus << EOF
> sys as sysdba
> spool /home/oracle/stopdb.log
> shutdown abort;
> spool off
> quit;
> EOF
>
> exit

jg

--
@home.com is bogus.
http://www.iht.com/bin/print.php?file=528268.html
Received on Wed Jul 07 2004 - 19:14:01 CDT

Original text of this message

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