Operating System - HP-UX
1833175 Members
2726 Online
110051 Solutions
New Discussion

Re: starting programms at startup

 
SOLVED
Go to solution
Luis Varon
Occasional Advisor

starting programms at startup

Hi,

i have a problem starting automatic an Oracle9i Database after an reboot of the server.

As mentioned in the HP-UX Documentation I created a script to automatic start und stop the Database. I tried all the instrunctions by hand and it work fine. I although create the symbolic links mentioned in the Documentation.

Although the Database is not started after reboot. In rc.log I get the following Message:

Output from "/sbin/rc3.d/S99dbora start":
----------------------------
/sbin/rc3.d/S99dbora[24]: su: not found.
"/sbin/rc3.d/S99dbora start" FAILED
Can someone please help me and tell me what am I doing wrong.

Many thanks in advance

Luis
lvaron
7 REPLIES 7
Deepak Extross
Honored Contributor
Solution

Re: starting programms at startup

Sounds like 'su' is not in it's path.
Try replacing the "su" on line 24 of sbin/rc3.d/S99dbora with "/usr/bin/su"
John Palmer
Honored Contributor

Re: starting programms at startup

Hi,

Startup scripts have a very limited shell environment. It sounds as though PATH isn't set correctly.

Could you post your startup script?

Regards,
John
BFA6
Respected Contributor

Re: starting programms at startup

Just a thought - in the script do you have the full path to the su command ?

If not try putting it in and see if it makes a difference.

Regards,

Hilary
Sukant Naik
Trusted Contributor

Re: starting programms at startup

Hi Luis,

The script is not able to find the su command.

So at line 24 in S99dbora file
change 'su' to '/usr/bin/su'.

Also, it is ideal to specify the shell in which you run the S99dbora file. So change your /sbin/init.d/dbora file and at the beginning mention #!/usr/bin/ksh

-Sukant
Who dares he wins
Luis Varon
Occasional Advisor

Re: starting programms at startup

Hi,

you all where right. He couldn't found the su command.

I've changed it but it still doesn't work.

Now I get this message in rc.log

Output from "/sbin/rc3.d/S99dbora start":
----------------------------
stty: : Not a typewriter
(c)Copyright 1983-1997 Hewlett-Packard Co., All Rights Reserved.
(c)Copyright 1979, 1980, 1983, 1985-1993 The Regents of the Univ. of California
(c)Copyright 1980, 1984, 1986 Novell, Inc.
(c)Copyright 1986-1992 Sun Microsystems, Inc.
(c)Copyright 1985, 1986, 1988 Massachusetts Institute of Technology
(c)Copyright 1989-1993 The Open Software Foundation, Inc.
(c)Copyright 1986 Digital Equipment Corp.
(c)Copyright 1990 Motorola, Inc.
(c)Copyright 1990, 1991, 1992 Cornell University
(c)Copyright 1989-1991 The University of Maryland
(c)Copyright 1988 Carnegie Mellon University
(c)Copyright 1991-1997 Mentat, Inc.
(c)Copyright 1996 Morning Star Technologies, Inc.
(c)Copyright 1996 Progressive Systems, Inc.
(c)Copyright 1997 Isogon Corporation


RESTRICTED RIGHTS LEGEND
Use, duplication, or disclosure by the U.S. Government is subject to
restrictions as set forth in sub-paragraph (c)(1)(ii) of the Rights in
Technical Data and Computer Software clause in DFARS 252.227-7013.


Hewlett-Packard Company
3000 Hanover Street
Palo Alto, CA 94304 U.S.A.

Rights for non-DOD U.S. Government Departments and Agencies are as set
forth in FAR 52.227-19(c)(1,2).
Not a terminal
stty: : Not a typewriter
stty: : Not a typewriter
logout

The command I use to start the database is the following:

/usr/bin/su - $ORA_OWNER -c "/opt/oracle/products/9.0.1/bin/dbstart &"

ORA_OWNER is an variable I define at the begin of the dbora script.

Maybe you could help me.

Many thanks in advance

Luis
lvaron
Deepak Extross
Honored Contributor

Re: starting programms at startup

The stty errors you are getting are probably because the $HOME/.profile of $ORA_OWNER has some "stty" commands. Commenting them out should make these errors go away.

Another thing - try replacing
/usr/bin/su - $ORA_OWNER -c "/opt/oracle/products/9.0.1/bin/dbstart &"
with
/usr/bin/su - $ORA_OWNER -c "nohup /opt/oracle/products/9.0.1/bin/dbstart &"

Good Luck!
Deepak Extross
Honored Contributor

Re: starting programms at startup

In fact, you should do it like this:
nohup /usr/bin/su - $ORA_OWNER -c "/opt/oracle/products/9.0.1/bin/dbstart" &
Let us know if this helps.