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 -> Starting Oracle on Unix Reboot

Starting Oracle on Unix Reboot

From: Norman Dunbar <Norman.Dunbar_at_lfs.co.uk>
Date: Fri, 13 Sep 2002 08:35:12 +0100
Message-ID: <E2F6A70FE45242488C865C3BC1245DA702A51A50@lnewton.leeds.lfs.co.uk>

Audrey,

from the top then :

Do you have a TNS_ADMIN environment variable set, (echo $TNS_ADMIN) if so, look in that location for a file called ORATAB. If not, look in either /etc (HP server) or /var/opt/oracle. Although you mention that you have edited the ORATAB file, you may be editing one that is not in TNS_ADMIN, and thus are being ignored.

Check that the file has an entry for your database along the lines of :

XXXX:/oracle/ora817/blah/blah:Y

First column, XXXX = SID name.
Next is ORACLE_HOME for that SID
Last is Autostart (with dbstart) and shut (with dbshut) Y = do it, N = I will start and stop manaully.

Make sure you have no blank lines in the oratab file, if you do, it won't work correctly. If you need to separate entries into logical groups, use a line with a '#' character at the start. (I've been bitten by that one in the past !)

If you don't have an entry, then this is why it wont start up. When you create a new database, you have to manually add a line to this file.

If the above is ok, then echo $ORACLE_HOME and $ORACLE_SID when logged in as the 'dba' user which owns the database. This could simply be the oracle user and you set the enviromnent using '. oratab' (dot space oratab) and then, typing in the oracle sid you want to use XXXX, in the correct letter case of course. This will read the oratab file and set oracle_home and oracle_sid according to what it finds there.

Assuming that dbstart 'just works' when logged into the unix server as the Oracle user, then it is most likely to be an environment setting in the user which is running the script in your startup - if the user is root, then it will probably not have an oracle environment set up. In your script, just add something like 'PATH=$PATH:oracle home/bin of highest version of Oracle on the server', then it will find dbstart and set the correct oracle homes and sids ready to start the databases. Although this is not too good a solution.

If the script is running as root, add this :

su - oracle_owner -c dbstart

Which will work like a working thing because it sets the correct environment.

Cheers,
Norman.

-----Original Message-----
From: audrey_at_marketaccess.ca (audrey) [mailto:audrey_at_marketaccess.ca] Posted At: Thursday, September 12, 2002 9:58 PM Posted To: server
Conversation: Starting Oracle on Unix Reboot Subject: Re: Starting Oracle on Unix Reboot

Hi Norman!
Yes, we've tried dbstart, and nothing happens yes, the database is the only database on the server, although there were a couple other databases on there which I deleted.

I am sure the ORACLE_HOME is correct, however I am not so sure about the ORACLE_SID

I would assume they are the both correct, because when I reconfigure the database, it runs fine. I just find it odd that you would need to reconfigure the database everytime the computer reboots. Received on Fri Sep 13 2002 - 02:35:12 CDT

Original text of this message

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