- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Needs scripts to start oracle 9i
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
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
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
тАО02-19-2002 09:19 PM
тАО02-19-2002 09:19 PM
on HP 11i. Currently, i do not have any script to test this database. If it is possible would you show me some sample of them?...
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-19-2002 09:30 PM
тАО02-19-2002 09:30 PM
SolutionTry this one:
#!/sbin/sh
#
# Args:
# start : start Oracle
# stop : stop Oracle
#
# Return Values:
# 0 : successfull completion of task
# 1 : failure to complete task
# NOTE: If your script executes in run state 0 or state 1, then /usr might
# not be available. Do not attempt to access commands or files in
# /usr unless your script executes in run state 2 or greater. Other
# file systems typically not mounted until run state 2 include /var
# and /opt.
rval=0
# Check the exit value of a command run by this script. If non-zero, the
# exit code is echoed to the log file and the return value of this script
# is set to indicate failure.
set_return() {
x=$?
if [ $x -ne 0 ]; then
echo "EXIT CODE: $x"
rval=1 # script FAILed
fi
}
case "$1" in
'start_msg')
# Emit a _short_ message relating to running this script with
# the "start" argument; this message appears as part of the checklist.
echo "Starting Oracle"
;;
'stop_msg')
# Emit a _short_ message relating to running this script with
# the "stop" argument; this message appears as part of the checklist.
echo "Stopping Oracle"
;;
'start')
echo "Start Oracle"
/usr/bin/su - oracle -c "dbstart"
/usr/bin/su - oracle -c "lsnrctl start LISTENER"
set_return
;;
'stop')
echo "Stop Oracle"
/usr/bin/su - oracle -c "lsnrctl stop LISTENER"
/usr/bin/su - oracle -c "dbshut"
set_return
;;
*)
echo "usage: $0 {start|stop}"
rval=1
;;
esac
exit $rval
If you wish to have it enabled for automatic startup of the system you can use the above script in /sbin/init.d/oracle and then create symbolic links like below:
Start:
ln -s /sbin/init.d/oracle /sbin/rc3.d/S900oracle
Stop:
ln -s /sbin/init.d/oracle /sbin/rc2.d/K900oracle
HTH
-Michael
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-19-2002 11:15 PM
тАО02-19-2002 11:15 PM
Re: Needs scripts to start oracle 9i
Oracle does NOT create a boot-time auto-start script. edit /etc/oratab and change 'N' to 'Y' for the database you want to autostart. Then create the following file as /sbin/init.d/oracle
#!/sbin/sh
#Match ORACLE_HOME with whatever is in oracle/.profile
case $1 in
start)
su - oracle -c $ORACLE_HOME/bin/dbstart
su - oracle -c "$ORACLE_HOME/bin/lsnrctl start"
exit 0
;;
stop)
su - oracle -c "$ORACLE_HOME/bin/lsnrctl stop"
su - oracle -c $ORACLE_HOME/bin/dbshut
;;
esac
#cd /sbin/init.d
ln -s ../init.d/oracle /etc/rc2.d/S95oracle
ln -s ../init.d/oracle /etc/rc2.d/K15oracle
chmod 0755 /etc/init.d/oracle
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-20-2002 04:07 AM
тАО02-20-2002 04:07 AM
Re: Needs scripts to start oracle 9i
Your quiestion is not quite clear. If you have installed the ORacle9i Software and want to CREATE a database, you'll have to issue the create database statements ++++
Have attached a script that creates directories for datafiles etc and creates a database and runs necessary scripts.
Andreas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-21-2002 09:55 AM
тАО02-21-2002 09:55 AM
Re: Needs scripts to start oracle 9i
Thank you for the scripts. I haven't start to use it yet but I do have several questions in reagards to it?
1. What steps prior to it do I need to know?
create vg? logical volumes?
2. This script will be executed from which user? root or oracle?
3. Do I need to edit any file before issued this script to run?
Database is not my expertise, and please be patient with me. Thank you very much for your time.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-21-2002 11:05 AM
тАО02-21-2002 11:05 AM
Re: Needs scripts to start oracle 9i
i cd to /etc
and try to find init.d : i could't find it
so i did vi /etc/init.d/oracle
at the end....
error message : can't find the file when i try to do wq!
can you help me???
ps....i can't seem to located /etc/init.d directory in root??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-21-2002 11:17 AM
тАО02-21-2002 11:17 AM
Re: Needs scripts to start oracle 9i
This command does not seem to work
#cd /sbin/init.d
ln -s ../init.d/oracle /etc/rc2.d/S95oracle
ln -s ../init.d/oracle /etc/rc2.d/K15oracle
chmod 0755 /etc/init.d/oracle
here is the error message
ls -s ../init.d/oracle /etc/rc2.d/S99oracle
/etc/rc2.d/S99oracle not found
2 ../init.d/oracle
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-21-2002 11:44 AM
тАО02-21-2002 11:44 AM
Re: Needs scripts to start oracle 9i
create symbolic link...
I did not give the rite path of symbolic link...silly me...
thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-21-2002 12:07 PM
тАО02-21-2002 12:07 PM
Re: Needs scripts to start oracle 9i
Here is what i have done so far :
1. installation of HP - oracle 9i
2. create /sbin/init.d/oracle and symbolic to start up the database...
AT this point, I am lost of what should I do next? the documentation that I got just confuse me very much? Can some1 help me on the next step? so i can get the database running and run some simple I/O to those mount points?
I 'm greatly appreciate all of your help...
Deanna