Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: dbstart from rc2.d files
> i'm trying to bringup Oracle database through an /etc/rc2.d/S98oracle
>script and it fails in lack of permission to bringup the database.
>How do i bringup the database from the S98oracle script ?
Assuming your oracle account to be called oracle and that you have a script called startdb that works when executed as the user oracle, then to start your dabase from rc2.d/S98oracle you would need a line akin to
su - oracle -c dbstart
'su - oracle', as opposed to just 'su oracle' will make sure that root inheirits any custom variables and setting that oracle itself enjoys when logging on e.g. a default ORACLE_SID; an 'su oracle' (without the minus sign), as I understand it, mererly switches the user and group ID's.
The '-c' parameter tells root to su for only one command. the command in question being our sbstart script.
Good Luck,
Mark H
Received on Sun Nov 23 1997 - 00:00:00 CST