- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Init scripts for Oracle startup/shutdown on re...
Operating System - HP-UX
1753797
Members
6872
Online
108799
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- 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-08-2002 05:42 AM
тАО07-08-2002 05:42 AM
Re: Init scripts for Oracle startup/shutdown on reboot
hello,
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
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
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
- 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
Thank you!
I will try your script and update you on the results.
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
You might find this utility useful as well.
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
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
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- « Previous
-
- 1
- 2
- Next »
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP