1- Edit /etc/oratab

$ vi /etc/oratab

"/etc/oratab" 24 lines, 765 characters
# This file is used by ORACLE utilities. It is created by root.sh
# and updated by the Database Configuration Assistant when creating
# a database.
# A colon, ':', is used as the field terminator. A new line terminates
# the entry. Lines beginning with a pound sign, '#', are comments.
# Entries are of the form:
# The first and second fields are the system identifier and home
# directory of the database respectively. The third filed indicates
# to the dbstart utility that the database should , "Y", or should not,
# "N", be brought up at system boot time.
# Multiple entries with the same $ORACLE_SID are not allowed.
ORABCKP:/oracle/app/oracle/product/10.2.0:N <-------- will be Y


2- Create a script under /sbin/init.d

$vi /sbin/init.d/oracle

# @(#)
# NOTE: This script is not configurable! Any changes made to this
# scipt will be overwritten when you upgrade to the next
# release of HP-UX.
# WARNING: Changing this script in any way may lead to a system that
# is unbootable. Do not modify this script.
export PATH
set_return() {
if [ $x -ne 0 ]; then
echo "EXIT CODE: $x"

case $1 in
# Oracle listener and instance startup
echo -n "Starting Oracle: "
su - $ORA_OWNR -c "$ORA_HOME/bin/dbstart /oracle/app/oracle/product/10.2.0"
echo "OK DB started"
# Oracle listener and instance shutdown
echo -n "Shutdown Oracle: "
su - $ORA_OWNR -c "$ORA_HOME/bin/dbshut /oracle/app/oracle/product/10.2.0"
echo "OK DB shutdown"
$0 stop
$0 start
echo "usage: $0 {start|stop}"

exit $rval

3- Decide the runlevel and create soft links for the script we created.

Under /sbin/rc3.d
ln -s /sbin/init.d/oracle S999oracle

Under /sbin/rc1.d and /sbin/rc2.d
ln -s /sbin/init.d/oracle K9oracle

2 Responses so far.

  1. Srinu says:

    Thank you for sharing such a nice and interesting blog with us. I have seen that all will say the same thing repeatedly. But in your blog, I had a chance to get some useful and unique information.

    Oracle Fusion HCM Online Training

  2. Bagyaraju says:

    I would like to thank you for the efforts you have made in writing this article. I am hoping the same best work from you in the future as well.

    Oracle Fusion SCM Online Training

Powered by Blogger.

Page Views

- Copyright © Emre Baransel - Oracle Blog -Metrominimalist- Powered by Blogger - Designed by Johanes Djogan -