From: "Billy Verreynne" <vslabs@onwe.co.za>
Newsgroups: comp.databases.oracle.server
Subject: Re: Restarting Oracle after shutting down UNIX without shutting down Oracle first
Date: Wed, 8 Aug 2001 15:36:28 +0200
Organization: The South African Internet Exchange
Lines: 48
Message-ID: <9krfgm$7vg$1@ctb-nnrp2.saix.net>
References: <jLac7.3260$NE.167325@wards>
NNTP-Posting-Host: 198.54.202.209
X-Trace: ctb-nnrp2.saix.net 997278038 8176 198.54.202.209 (8 Aug 2001 13:40:38 GMT)
X-Complaints-To: abuse@saix.net
NNTP-Posting-Date: 8 Aug 2001 13:40:38 GMT
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4133.2400
X-MIMEOLE: Produced By Microsoft MimeOLE V5.50.4133.2400


"Nick" <nospam@nospam.com> wrote

> I have been given the task of getting an Oracle database started after the
> UNIX server was shutdown without shutting down Oracle first. I have no DBA
> experience with Oracle at all, and come from an MS background so all this is
> new to me.

Oohh.. a Microsoft dude.. get him lads, I hold him down! ;-)

> I am basically trying to get Oracle up and running as it was before the
> server was shutdown, so any assistance will be greatly appreciated.

You need to use server manager and not sqlplus. Let's assume the script is run
as root. Okay root will not do as it will not have the right privileges or
environment to connect internally. So we do something like:
--
#!/bin/sh

# Startup for Oracle
su - oracle /home/oracle/startup-database.sh
--
The above script must be run via the the standard Unix startup scripts (in rc2.d
or wherever).

Okay, now for the startup script:
--
#!/bin/sh

# we assume that the .profile is correct and
# contains a valid ORACLE_HOME and the correct
# ORACLE_SID to start up

svrmgrl << EOF
connect internal
startup
exit
EOF
--

The right way to do it is to use the startup utility (dbstart) installed by
Oracle on Unix and simply to edit the /etc/oratab file to specify which
databases to auto start when Unix boots.

--
Billy




