- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: startup script
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2008 05:55 AM
05-08-2008 05:55 AM
startup script
we re using dbora script for starting,stoping
listners and dtbse.
While running under root user it work fine
we want execute this script on server startup
for this we have created soft link under
/sbin/rc1.d & rc2.d like
bash-3.2# pwd
/sbin/rc2.d
bash-3.2# ls -l S99dbora
lrwxr-xr-x 1 root sys 18 Apr 25 23:05 S99dbora -> /sbin/init.d/dbora
bash-3.2# pwd
/sbin/rc1.d
bash-3.2# ls -l K100dbora
lrwxr-xr-x 1 root sys 18 Apr 25 23:04 K100dbora -> /sbin/init.d/dbora
this didn't work?
pls provide some input to resolve the issue
thanks
shabir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2008 06:00 AM
05-08-2008 06:00 AM
Re: startup script
If you execute the scrips as any user you have a path to used in script binaries.
Use full patch in script - like /usr/bin/ping
or set PATH with appropriate values.
regards,
ivan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2008 06:20 AM
05-08-2008 06:20 AM
Re: startup script
ls -l /sbin/init.d/dbora
You should note that scripts have to be shut down in the reverse order to that in which they are started. To achieve this, you should make sure your K and S numbers add up to 1000.
Mark Syder (like the drink but spelt different)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2008 06:39 AM
05-08-2008 06:39 AM
Re: startup script
Well, that's not real helpful. What didn't work? Did you get any error messages? Was anything displayed on the console during the reboot? Did you check the /etc/rc.log file to see if there were any messages there?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2008 08:42 AM
05-08-2008 08:42 AM
Re: startup script
Try to put it in rc3.d directory. and restart the server.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2008 08:49 AM
05-08-2008 08:49 AM
Re: startup script
this seems to be a known issue. Try above run-level 2.
hope this helps!
kind regards
yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2008 08:01 PM
05-08-2008 08:01 PM
Re: startup script
please refer to metalink note: 1074016.6 - 'dbora' does not work on Redhat linux.
Solution:
You will need to change the link to run level 3.
From:
ln -s /sbin/init.d/dbora /sbin/rc2.d/S99dbora
To:
ln -s /sbin/init.d/dbora /sbin/rc3.d/S99dbora
Explanation:
Linux uses run level 3 instead of run 2 by default for multi-user access.
hope this helps!
kind regards
yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-09-2008 09:03 PM
05-09-2008 09:03 PM
Re: startup script
We have executed it on rc3.d run level
but it didn't work.
also we are using hp ux 11.23 version
thanks
shabir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-09-2008 09:13 PM
05-09-2008 09:13 PM
Re: startup script
Any error messages in the rc.log?
revert!
kind regards
yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-09-2008 09:49 PM
05-09-2008 09:49 PM
Re: startup script
there seems no message related dbora stratup
thanks
shabir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2008 09:33 AM
05-10-2008 09:33 AM
Re: startup script
can you post the rc.log for further verifications?
and also
cd /sbin
ll */*dbora*
revert!
kind regards
yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-12-2008 09:57 PM
05-12-2008 09:57 PM
Re: startup script
pls find the required info.
we are using soft link for dbora3 script
# pwd
/sbin
# ll */*dbora*
-rwxr-x--- 1 root dba 0 May 8 19:20 init.d/dbora
-rwxrwxrwx 1 root dba 1888 Apr 25 14:09 init.d/dbora1
-rwxrwxrwx 1 root dba 988 Apr 10 17:09 init.d/dbora2
-rwxr-x--- 1 root dba 1041 Apr 25 14:08 init.d/dbora3
-rw-r--r-- 1 root sys 902 Apr 25 14:05 init.d/dborahange
lrwxr-xr-x 1 root sys 18 Apr 25 23:04 rc1.d/K100dbora -> /sbin/init.d/dbora
lrwxrwxr-x 1 root sys 18 May 13 10:35 rc2.d/K100dbora3 -> /sbin/init.d/dbora
-rwxr-x--- 1 bin bin 939 Apr 28 15:07 rc2.d/S99dbora.org
lrwxr-xr-x 1 root sys 18 Apr 25 23:03 rc3.d/K10dbora -> /sbin/init.d/dbora
lrwxrwxr-x 1 root sys 18 May 13 10:35 rc3.d/S99dbora3 -> /sbin/init.d/dbora
lrwxrwxr-x 1 root sys 18 May 13 10:34 r -> /sbin/init.d/dbora
thanks
shabir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2008 04:02 AM
05-13-2008 04:02 AM
Re: startup script
> -rwxr-x--- 1 root dba 0 May 8 19:20 init.d/dbora
can you change the permission and ownership as follows:
chown bin:bin /sbin/init.d/oradb
chmod 755 /sbin/init.d/oradb
also post the output of:
cat /etc/rc.config.d/dbora
this should show something like:
SRV2:sbin/init.d>cat /etc/rc.config.d/dbora
# ORACLE DATABASE configuration
#
# ORACLE_START_STOP : Set to 1 to start ORACLE DATABASE
#
ORACLE_START_STOP=1
SRV2:sbin/init.d>
revert!
kind regards
yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2008 07:27 AM
05-13-2008 07:27 AM
Re: startup script
/sbin/rc2.d/S99dbora.org[7]: hostname: not found.
/sbin/rc2.d/S99dbora.org[12]: touch: not found.
starting Oracle Net Listener
/sbin/rc2.d/S99dbora.org[23]: su: not found.
Starting Oracle databases
/sbin/rc2.d/S99dbora.org[26]: su: not found.
PATH ie absolute PATH for those command are not defined in the script so just correct it and it ll works fine
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2008 11:30 PM
05-13-2008 11:30 PM
Re: startup script
> the answers is in your rc.log file
No really.
If you look at the "ll */*dbora*" output, S99dbora.org is not a link but a script created in the rc2.d directory.
-rwxr-x--- 1 bin bin 939 Apr 28 15:07 rc2.d/S99dbora.org
The intended script "dbora" startup does not even appear in the rc.log!!
lrwxrwxr-x 1 root sys 18 May 13 10:35 rc3.d/S99dbora3 -> /sbin/init.d/dbora
Thats presumes a step in the configuration that has not been done properly..
Shabir: please post the requested information as per my last post.
thanks
yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-14-2008 02:05 AM
05-14-2008 02:05 AM
Re: startup script
if not problem may comes from that point
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-15-2008 04:30 AM
05-15-2008 04:30 AM
Re: startup script
thanks for u reply
pls find the output
bash-3.2# cat /etc/rc.config.d/dbora
ORACLE_START=1
export ORACLE_START
thanks
shabir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-15-2008 09:01 AM
05-15-2008 09:01 AM
Re: startup script
after rebooting the server ,pls the folowing entries are found in /etc/rc.log file
usage: /sbin/rc2.d/S99dbora {start|stop}
Output from "/sbin/rc2.d/S99dbora start":
----------------------------
/sbin/rc2.d/S99dbora[9]: hostname: not found.
/sbin/rc2.d/S99dbora[14]: touch: not found.
starting Oracle Net Listener
/sbin/rc2.d/S99dbora[25]: su: not found.
Starting Oracle databases
/sbin/rc2.d/S99dbora[28]: su: not found.
usage: /sbin/rc2.d/S99dbora.org {start|stop}
Output from "/sbin/rc2.d/S99dbora.org start":
----------------------------
/sbin/rc2.d/S99dbora.org[7]: hostname: not found.
/sbin/rc2.d/S99dbora.org[12]: touch: not found.
starting Oracle Net Listener
Starting Oracle databases
/sbin/rc2.d/S99dbora.org[23]: su: not found.
/sbin/rc2.d/S99dbora.org[26]: su: not found.
thanks
shabir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-15-2008 11:20 PM
05-15-2008 11:20 PM
Re: startup script
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2008 03:29 AM
05-16-2008 03:29 AM
Re: startup script
There is something with the script itself. We need to check what Fabien mentioned previously.
"let's check if the #! pragma in your shell is referencing a shell in /sbin if not problem may comes from that point"
Can you post your dbora script?
revert!
kind regards
yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2008 08:58 AM
05-16-2008 08:58 AM
Re: startup script
kindly find contents of dbora script
ORACLE_HOME=/u01/app/oracle/OraHome_1;export ORACLE_HOME
#;export ORACLE_HOME
ORACLE_SID=ciehoi;export ORACLE_SID
# oracle owner at your site.
ORACLE=oracle
PATH=${PATH}:$ORACLE_HOME/bin
HOST=`hostname`
PLATFORM=`uname`
export ORACLE_HOME PATH
#
LOG=$ORACLE_HOME/stop1.log
touch $LOG
chmod a+r $LOG
#
case $1 in
'start')
echo "$0: starting up" >> $LOG
date >> $LOG
# Start Oracle Net
if [ -f $ORACLE_HOME/bin/tnslsnr ] ;
then
echo "starting Oracle Net Listener"
su - $ORACLE -c "lsnrctl start" >> $LOG2>&1 &
fi
echo "Starting Oracle databases"
su - $ORACLE -c "dbstart" >> $LOG2>&1 &
;;
'stop')
echo "$0: shutting down" >> $LOG
date >> $LOG
# Stop Oracle Net
if [ -f $ORACLE_HOME/bin/tnslsnr ] ;
then
echo "stopping Oracle Net Listener">> $LOG2>&1&
su - $ORACLE -c "lsnrctl stop" >> $LOG2>&1 &
fi
echo "stopping Oracle databases">>$LOG2>&1&
su - $ORACLE -c "dbshut" >> $LOG2>&1 &
;;
*)
echo "usage: $0 {start|stop}"
exit
;;
thanks
shabir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-17-2008 01:59 AM
05-17-2008 01:59 AM
Re: startup script
This script is not according to standards. Please modify the script such that it looks something similar to /sbin/init.d/syslogd
i.e.
#!/sbin/sh
...
rval=0
set_return() {
x=$?
if [ $x -ne 0 ]; then
echo "EXIT CODE: $x"
rval=1
fi
}
...
exit $rval
Please let us know if this works!
kind regards
yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-18-2008 09:07 PM
05-18-2008 09:07 PM
Re: startup script
it didn't work
for u info,rc.log contents
usage: /sbin/rc2.d/S99dbora {start|stop}
Output from "/sbin/rc2.d/S99dbora start":
----------------------------
/sbin/rc2.d/S99dbora[11]: exit0: not found.
/sbin/rc2.d/S99dbora[18]: hostname: not found.
/sbin/rc2.d/S99dbora[23]: touch: not found.
starting Oracle Net Listener
/sbin/rc2.d/S99dbora[34]: su: not found.
Starting Oracle databases
/sbin/rc2.d/S99dbora[37]: su: not found.
usage: /sbin/rc2.d/S99dbora.org {start|stop}
Output from "/sbin/rc2.d/S99dbora.org start":
----------------------------
/sbin/rc2.d/S99dbora.org[7]: hostname: not found.
/sbin/rc2.d/S99dbora.org[12]: touch: not found.
starting Oracle Net Listener
Starting Oracle databases
thanks
shabir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-18-2008 10:53 PM
05-18-2008 10:53 PM
Re: startup script
can you please post your "new" dbora script?
kind regards
yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-18-2008 11:08 PM
05-18-2008 11:08 PM
Re: startup script
PATH=${PATH}:$ORACLE_HOME/bin
This is the first time PATH is declared. You need to incorporate the path of the commands su, hostname, etc.
Mark