From: David Fitzjarrell <oratune@aol.com>
Newsgroups: comp.databases.oracle.server
Subject: Re: Problem when starting up database instance
Date: Tue, 12 Dec 2000 14:21:47 GMT
Organization: Deja.com - Before you buy.
Lines: 110
Message-ID: <915c9l$ct3$1@nnrp1.deja.com>
References: <3A35C945.1C8BC010@schaefer-shop.de> <3A35E910.BFA0DE@schaefer-shop.de>
NNTP-Posting-Host: 64.19.63.135
X-Article-Creation-Date: Tue Dec 12 14:21:47 2000 GMT
X-Http-User-Agent: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)
X-Http-Proxy: 1.1 x63.deja.com:80 (Squid/1.1.22) for client 64.19.63.135
X-MyDeja-Info: XMYDJUIDddf_dba


In our last gripping episode Markus =?iso-8859-1?Q?B=F6hmer?=
<markus.boehmer@schaefer-shop.de> wrote:
> Markus B=F6hmer wrote:
> > =
 
> > Hello,
> > =
 
> > we are running an Oracle 8.1.5 database on a Sun Ultra Enterprise
 250.
> > After a normal shutdown of the database, and a normal reboot of the
> > Enterprise we can't get the Oracle Database back to work again.
>
> Ok, I have an Add-On to the error report.
>
> If I create virtual IP Interfaces during boot-time, then the Database
> won't start.
> now, if I delete this Interfaces, start the database and then run a
> script to create the interfaces everything works fine.
> The Interfaces are created with the /etc/hostname.hme0:# files. This
 is
> solaris specific.
> Now, if these interfaces exist when the database starts, oracle
> terminates with the given errors.
>
> Hope this will help.
>
> regards Markus
> -- =
>
> Markus Boehmer
> Systemadministrator & Datenbankentwickler
> SSI Schaefer Shop GmbH
> mailto:markus.boehmer@schaefer-shop.de
>

You should be starting the Oracle database via the rc scripts (located
in /etc/rc?.d, where ? is the run level).  Let us presume that these
virtual IP addresses are created from a script located in /etc/rc2.d.
The simplest solution is to place your S??oracle script just before the
virtual IP script executes.  This will start the database then create
your virtual IP addresses.  A sample setup is listed below:

In /etc/init.d there should be a script named oracle -- the scripts in
this directory are named after the service they start and stop.  This
script should be fairly simple; an example is shown below:

#!/bin/sh
#
#

case $1 in

     'start') su -c oracle - dbstart
              su -c oracle - "lsnrctl start";;

     'stop')  su -c oracle - "lsnrctl stop"
              su -c oracle - dbshut;;

     *)       echo "Invalid parameter: "$1
              echo "Usage: `basename $0` start|stop";;

esac

Again, this script will be located in /etc/init.d.  In the /etc/rc2.d
directory (I shall presume that this is the location of the virtual IP
creation script) a symbolic link to /etc/init.d/oracle is made.  The
name of the link should be chosen so that it falls before the virtual
IP creation script.  Let us say that we have our virtual IP script link
named S45virtIP.  Name the oracle link S44oracle.  A directory listing
will show the oracle service in line to be started before the virtual
IP's are created:

...
S44oracle
S45virtIP
...

You will also need to create a link, in /etc/rc2.d in our example, to
kill, or stop, the Oracle database when you leave run level 2.  Since
the virtual IP's have no effect on shutting down the database you can
set up oracle to be the first service stopped or the last service
stopped.  I prefer Oracle to shut down first:

K01oracle
...
K09virtIP
...
S44oracle
S45virtIP
...

Remember these are symbolic links.  To create such a link:

ln -s /etc/init.d/oracle /etc/rc2.d/S44oracle
ln -s /etc/init.d/oracle /etc/rc2.d/K01oracle

The same source script is used for both links.

If you configure the auto-startup of these services in this manner I
feel quite confident that you won't have database startup problems in
the future, at least not related to the virtual IP addresses.

--
David Fitzjarrell
Oracle Certified DBA


Sent via Deja.com http://www.deja.com/
Before you buy.

