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: startup and shutdown oracle in solaris 8

Re: startup and shutdown oracle in solaris 8

From: Juhan Kundla <juhan_at_ensib.NICHT-SPAM.ee>
Date: Thu, 30 Nov 2000 19:42:38 +0200
Message-ID: <3A26918E.F195DFA7@ensib.NICHT-SPAM.ee>

Sic! Use oratab for what?

The /etc/init.d/oracle script (or one of its subscripts) uses oratab to check out the oracle SIDs. You still need the "oracle" script and symlinks in /etc/rc?.d directory so initd daemon could start up the Oracle instances.

Juhan

ora_error_at_my-deja.com wrote:
>
> Why don't just use oratab?
>
> __________________
>
> In article <905viq$8un$1_at_nnrp1.deja.com>,
> David Fitzjarrell <oratune_at_aol.com> wrote:
> > In our last gripping episode Chris Lee <clee_at_innocent.com> wrote:
> > > Hi,
> > >
> > > My company just installed Oracle 8i on a solaris 8 machine. Right
 now,
> > > we have to start and shutdown the database manually. We would like
 to
> > > change it so that when the system starts, it will start the database
 and
> > > the listener, and when the system shutdowns, it will shutdown the
> > > database and the listener too. Does anyone knows how I can do it?
> > >
> > > Thanks,
> > >
> > > -- Chris
> > >
> >
> > That can be accomplished with the rc scripts used when the system
 boots
> > and shuts down. Most UNIX systems have /etc/rc?.d directories along
> > with an /etc/init.d directory. The /etc/init.d directory is used to
> > hold scripts designed to start and stop services; the scripts are
 named
> > after the service. For your Oracle database and listener you would
> > create a short script to start services or stop them depending upon
 the
> > parameter sent to the script. An example follows:
> >
> > #!/bin/sh
> > #
> > # oracle
> > #
> > # Start or stop Oracle services automatically
> > #
> > # Used at system boot or system shutdown
> > #
> >
> > case $1 in
> > 'start') su - oracle -c "dbstart"
> > su - oracle -c "lsnrctl start";;
> > 'stop') su - oracle -c "lsnrctl stop"
> > su - oracle -c "dbshut";;
> > *) echo "Invalid parameter"
> > echo "USAGE: `basename $0` start|stop";;
> > esac
> >
> > This script should be named 'oracle' and placed in /etc/init.d. Links
> > to this script should be made in the proper rc?.d directory -- most
> > UNIX systems boot to run level 3, therefore the links to this script
> > should be in /etc/rc3.d. The links should start with S?? (to start
 the
> > service) or K?? (to kill, or stop, the service). Examples of possible
> > link names are listed below:
> >
> > S99oracle
> > K01oracle
> >
> > Normally one would locate the oracle service as one of the last
> > services to start and one of the first services to stop, hence the S99
> > (probably the last 'S' entry in the rc3.d directory) and the K01 (one
> > of the first 'K' entries in rc3.d). These links are symbolic links,
 or
> > symlinks as the terminology goes. If you are not familiar with
> > creating such links the syntax is:
> >
> > ln -s /etc/init.d/oracle /etc/rc3.d/S99oracle
> > ln -s /etc/init.d/oracle /etc/rc3.d/K01oracle
> >
> > Presuming the system only uses run level 3 or is shut down these are
> > the only two links you need. Once the system leaves run level 3
> > (presumably by executing a shutdown) the Oracle services are stopped
> > and no longer available. Once the system enters run level 3 the
 Oracle
> > services are started (both the database and the listener) and, barring
> > any errors, the database and listener are ready for users.
> >
> > If you have any trouble getting this set up please feel free to email
> > me at oratune_at_aol.com or davidf_at_bcgsystems.com.
> >
> > --
> > David Fitzjarrell
> > Oracle Certified DBA
> >
> > Sent via Deja.com http://www.deja.com/
> > Before you buy.
> >
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
 

-- 
+-----------------+
|NB! Please remove|
|   .NICHT-SPAM   |
|  when replying  |
|    to get my    |
|     *REAL*      |
| e-mail address! |
|                 |
|  Cheers, Juhan  |
+-----------------+
Received on Thu Nov 30 2000 - 11:42:38 CST

Original text of this message

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