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: Restarting Oracle after shutting down UNIX without shutting down Oracle first

Re: Restarting Oracle after shutting down UNIX without shutting down Oracle first

From: Billy Verreynne <vslabs_at_onwe.co.za>
Date: Wed, 8 Aug 2001 15:36:28 +0200
Message-ID: <9krfgm$7vg$1@ctb-nnrp2.saix.net>

"Nick" <nospam_at_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
Received on Wed Aug 08 2001 - 08:36:28 CDT

Original text of this message

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