Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: OCI prg on Solaris boot failure
A copy of this was sent to Mauro Macchi <mmacchi_at_ais.it>
(if that email address didn't require changing)
On Tue, 19 May 1998 10:30:40 +0200, you wrote:
>Hello everybody,
>
>I have a problem running an OCI program (Oracle 7.3) on Solaris 2.5.1 at
>boot time.
>I am trying to run the program from within a shell script in /etc/rc2.d
>directory,
>which gets executed after the oracle boot sequence.
>I am catching an error in the olog() routine, whatever delay I use into
>the script
>in order to be sure that oracle processes are up and running.
>BUT, if I run the same script (say 'S99script start') from an xterm,
>everything
>works fine. The only difference I see between the two runs is that in
>the second case
>the process has an associated terminal (the pts of the shell running
>into the xterm)
The other difference might be the environment (or lack thereof in the rc2.d startup).
The way I do this is as such:
1- my 'oracle' script is in /etc/init.d/oracle. It is linked to
init.d/oracle rc0.d/K100oracle rc3.d/S100oracle
It contains simply:
# Start/stop processes required for oracle
case "$1" in
'start')
su - oracle8 -c orastart ;; 'stop') su - oracle8 -c orastop ;;
orastart and orastop do things like start the database with svrmgrl, start the listener with lsnrctl and so on. They also do things like run some pro*c and oci programs as well. I am sure the database has had a chance to start (since orastart starts it before running the programs) and I am sure the environment is setup correctly as well...
>while in the first case (at boot time) no terminal is associated to the
>process.
>I tried to redirect /dev/console as input file for the script and the
>process, but
>nothing changes. I also tried to execute from inittab, possibly applying
>the same
>redirections, but still nothing changes.
>
>Does anybody knows if the problem I am experiencing really depends on
>the missing
>terminal assignment to the process ?
>Does anybody knows a technique to startup an OCI program at boot time so
>that it works?
>
>Any help will be warmly appreciated, thanks a lot for the attention
>
> Mauro
Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government
Herndon VA
http://govt.us.oracle.com/ -- downloadable utilities
Anti-Anti Spam Msg: if you want an answer emailed to you, you have to make it easy to get email to you. Any bounced email will be treated the same way i treat SPAM-- I delete it. Received on Tue May 19 1998 - 13:10:55 CDT