- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Init scripts for Oracle startup/shutdown on reboot
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
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
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
тАО07-04-2002 01:48 AM
тАО07-04-2002 01:48 AM
I need to configure Oracle for automatic startup/shutdown on reboot (hp-ux 11.0).
The oracle doc gives the following guidelines:
1. In the /etc/init.d directory, create a dbora script similar to the following, if it does not already exist.
-- There isn't init.d directory in /etc
2. Create symbolic links to the dbora script in the appropriate run-level script directories, as follows:
# ln -s /etc/init.d/dbora /etc/rc0.d/K10dbora
# ln -s /etc/init.d/dbora /etc/rc3.d/S99dbora
Again, there are no rc0.d and rc3.d directories.
What do I have to do? Create them, or there are other files for hp-ux 11.0. I'm not sysadmin, so questions might seem too simple for most of you.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-04-2002 02:06 AM
тАО07-04-2002 02:06 AM
Re: Init scripts for Oracle startup/shutdown on reboot
In HP-UX , you have init.d under /sbin/init.d
you need not create symbolic links as rc*.d
directories are under /sbin itself.
There is one more file /etc/oratab which controls the startup of oracle instance at bootup.
# Entries are of the form:
# $ORACLE_SID:$ORACLE_HOME:
#
# The first and second fields are the system identifier and home
# directory of the database respectively. The third field 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.
example entry:-
D01:/oracle/D01:Y
will allow the oracle instance to be brought up at system bootup.
regards,
U.SivaKumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-04-2002 02:15 AM
тАО07-04-2002 02:15 AM
Re: Init scripts for Oracle startup/shutdown on reboot
Thank you for replying.
Is there any meaning in numbers rc3.d? Does 3 mean anything? Are all rcYYY links executing on reboot?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-04-2002 02:22 AM
тАО07-04-2002 02:22 AM
Re: Init scripts for Oracle startup/shutdown on reboot
Yes , there is a meaning for rc2.d , rc0.d etc
rc2.d means the directory which contains scripts which will be executed in run-level 2 and so on.
S99dbora means S-start script 99-unique number
K10dbora means K-kill (stop) script 10-unique number
regards,
U.SivaKumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-04-2002 02:34 AM
тАО07-04-2002 02:34 AM
Re: Init scripts for Oracle startup/shutdown on reboot
Hi,
I hope that you are referring to oracle on solaris. In HP it's like this.
Make sure the entry for your database SID in the /etc/oratab file ends in a capital "Y".
ORCL:/u01/app/oracle/product/8.0.5:Y
The scripts for starting and stopping databases are: $ORACLE_HOME/bin/dbstart and dbshut. Net8 is started with the lsnrctl command. Add the following entries to your /etc/rc2.d/S99dbstart (or equivalent) file:
su - oracle -c "/path to/$ORACLE_HOME/bin/dbstart" # Start DB's
su - oracle -c "/path to/$ORACLE_HOME/bin/lsnrctl start" # Start listener
su - oracle -c "/path to/$ORACLE_HOME/bin/namesctl start" # Start OraNames (optional)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-04-2002 03:07 AM
тАО07-04-2002 03:07 AM
Re: Init scripts for Oracle startup/shutdown on reboot
I've done all the step, however oracle fails to start.
I started it manualy from prompt
$ORACLE_HOME/bin/dbstart
however i get error message
Cannot find init file for database DBNAME.
The pfile is in the correct $ORACLE_BASE/admin/dbname folder.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-04-2002 03:18 AM
тАО07-04-2002 03:18 AM
Solutionlogin as oracle
$cd $ORACLE_HOME/dbs
If u have created a instance by name 'x' there should be a file by name 'initx.ora'. Since you are getting error as .ora file doesn't exist,
$cp init.ora initx.ora
$vi initx.ora
change the db_name to instance name
(in this case: db_name=x)
save and close the file
$ cd
$ dbstart
Now the instance 'x' must start.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-04-2002 03:26 AM
тАО07-04-2002 03:26 AM
Re: Init scripts for Oracle startup/shutdown on reboot
Now it is starting ok.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-04-2002 11:02 PM
тАО07-04-2002 11:02 PM
Re: Init scripts for Oracle startup/shutdown on reboot
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-05-2002 12:16 AM
тАО07-05-2002 12:16 AM
Re: Init scripts for Oracle startup/shutdown on reboot
Is there an example oracle startup script that would solve the above mention issues. The oracle script that comes with docs, as you pointed out in your post, doesn't work, and hangs.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-08-2002 05:42 AM
тАО07-08-2002 05:42 AM
Re: Init scripts for Oracle startup/shutdown on reboot
this is how i do it!
1. in /sbin/init.d
file oracle
(see attachment)
2. Create links to look as below:
yd: /sbin>ll rc*/*oracle*
lrwxr-xr-x 1 root sys 19 Dec 16 2001 rc1.d/K100oracle -> /sbin/init.d/oracle
lrwxr-xr-x 1 root sys 19 Dec 16 2001 rc2.d/S900oracle -> /sbin/init.d/oracle
3. Config file
yd: /etc/rc.config.d>more oracle
#YD/CMT-16/12/2001
# ORACLE DATABASE configuration
#
# ORACLE_START_STOP : Set to 1 to start ORACLE DATABASE
#
ORACLE_START_STOP=1
yd: /etc/rc.config.d>
Hope this helps!
best regards
yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-08-2002 05:48 AM
тАО07-08-2002 05:48 AM
Re: Init scripts for Oracle startup/shutdown on reboot
I will try your script and update you on the results.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-15-2002 11:25 AM
тАО08-15-2002 11:25 AM
Re: Init scripts for Oracle startup/shutdown on reboot
It determines your first /etc/oratab database marked Y(auto start), you need to have /etc/oratab set up with a Y flag or the standard dbstart script won't start anything.
This guy if run . /usr/contrib/bin/oracle.default
It will set an very useful environment variable. Name it what you want by changing the script, but it is very useful so your backup and startup scripts know what the boxes primary database is. If you have a primary databse. Most useful on our prod box, which we switch instances every time we put a new deliverable into production. This methodoloy aids in testing.
code of oracle.default
#!/usr/bin/sh
# oracle.info A script to get oracle instance and other information
# from the first entry on the /etc/oratab file
#
# Created: Shmuel Y. Protter
# 05-29-2002
# Modifications
# FML MM-DD-YYYY Description of the changes ......
#
#
#
# if [ "$LOGNAME" = "oracle" ]
# then
# oktorun="Y"
# echo "User oracle detected"
# fi
# if [ "$LOGNAME" = "oraoper" ]
# then
# oktorun="Y"
# echo "User oraoper detected"
# fi
# if [ "$oktorun" = "Y" ]
# then
# echo "user is authorized...$LOGNAME"
# else
# echo "user must be oracle or oraoper: $LOGNAME"
# exit 1
# fi
SetOptions=$-
set +u
export ORATAB=/etc/oratab; [ -f $ORATAB ] ||
export ORATAB=/var/opt/oracle/oratab
sidfile=/utmp/sids.file
# awk -F: '/^[^#*]+:/ {print $1 " " $3}' $ORATAB > $sidfile
# awk -F: '/^[^#*]+:/ {print $1}' $ORATAB > $sidfile
inum=1
cat $ORATAB | while read LINE
do
case $LINE in
\#*) ;;#comment-line in oratab
*)
if [ "`echo $LINE | awk -F: '/^[^#*]+:/ {print $3}' -`" = "Y" ] ; then
if [ $inum -eq 1 ]
then
ORA_INSTANCE=`echo $LINE | awk -F: '{print $1}' -`
ORA_HOME=`echo $LINE | awk -F: '{print $2}' -`
# echo "checking oracle sid: $ORA_INSTANCE "
# echo "checking oracle hme: $ORA_HOME "
export ORA_INSTANCE
export ORA_HOME
fi
# /usr/contrib/bin/shutsid.sh $ORACLE_SID
((inum = inum + 1 ))
fi
esac
done
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com