- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re : startup and shutdown script for oracle
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
тАО06-17-2002 03:17 AM
тАО06-17-2002 03:17 AM
Can someone teach me how to write a startup and shutdown script for oracle. And where can I place the startup and shutdown script so that it can do a auto startup and shutdown.
Regards
Vincent
Solved! Go to Solution.
- Tags:
- Oracle
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-17-2002 03:22 AM
тАО06-17-2002 03:22 AM
Re: Re : startup and shutdown script for oracle
Try this post (found by searching on "startup script" +Oracle)
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xeaf869b1e860d511abcd0090277a778c,00.html
I think that should help you.
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-17-2002 05:16 AM
тАО06-17-2002 05:16 AM
Re: Re : startup and shutdown script for oracle
Maybe this link can help,
http://docs.hp.com/hpux/onlinedocs/os/startup.pdf
Hope this helps.
Regds
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-17-2002 11:44 AM
тАО06-17-2002 11:44 AM
Re: Re : startup and shutdown script for oracle
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-18-2002 12:48 AM
тАО06-18-2002 12:48 AM
SolutionYou have to use the supplied dbstart and dbshut scripts
located in $ORACLE_HOME/bin.
Reference these scripts from a rc script placed under /sbin/init.d/
rc-script dbora:
#!/sbin/sh
# Start/stop of Oracle database
#
ORA_HOME=/oracle/product/8.0.6
ORA_OWNER=oracle
if [ ! -f $ORA_HOME/bin/dbstart -o ! -d $ORA_HOME ]
then
echo "Oracle startup: cannot start"
exit
fi
case "$1" in
start_msg)
echo "Start ORACLE server"
;;
stop_msg)
echo "Stop ORACLE server"
;;
'start')
# Start the oracle databases
/usr/bin/su - $ORA_OWNER -c $ORA_HOME/bin/dbstart
;;
'stop')
# Stop the oracle databases
/usr/bin/su - $ORA_OWNER -c $ORA_HOME/bin/dbshut
;;
esac
Then make a link to this script and place in /sbin/rc2.d and rc0.d :
ln -s /sbin/init.d/dbora /sbin/rc2.d/S990dbora
ln -s /sbin/init.d/dbora /sbin/rc0.d/K10dbora
Then ensure that your oratab file is inplace in /etc/oratab, and enter a Y in the last column of those databases supposed to start.
BICO_XXU:/oracle/product/8.1.7:Y
Andreas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-18-2002 03:57 AM
тАО06-18-2002 03:57 AM
Re: Re : startup and shutdown script for oracle
This comes from our system. We do it every night, so we can do extraa backups as required. It works very well.
I also included the dump command that will create an oracle dump file... just in case.
Good luck!
Jerry Jaynes
/dbase/oracle/data_srv/intralink/bin/dserv_shutdown # To shutdown Oracle Data Server
/dbase/oracle/data_srv/intralink/bin/dserv_startup # To startup Oracle Data Server
/dbase/oracle/data_srv/intralink/export/cron_dump # Database Dump file creation utility.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-18-2002 04:02 AM
тАО06-18-2002 04:02 AM
Re: Re : startup and shutdown script for oracle
These are the actual scripts, The note above was for the correct locations. Check your permissions and see that they are as follows:
-rwxr-xr-x 1 oracle dba
/dbase/oracle/data_srv/intralink/bin/dserv_shutdown
#!/bin/csh -f
# /usr/ucb is not on the path while processing rc files (whoami is
# in /usr/ucb on sun4_solaris.
setenv ORACLE_HOME /dbase/oracle/data_srv/oracle
set path=( $path /usr/ucb )
if ( `whoami` == "root" ) then
su - oracle -c "$ORACLE_HOME/bin/dbshut_ilink >& $ORACLE_HOME/rdbms/log/dbstop.log"
else
$ORACLE_HOME/bin/dbshut_ilink >& $ORACLE_HOME/rdbms/log/dbstop.log
endif
/dbase/oracle/data_srv/intralink/bin/dserv_startup
#!/bin/csh -f
# /usr/ucb is not on the path while processing rc files (whoami is
# in /usr/ucb on sun4_solaris.
setenv ORACLE_HOME /dbase/oracle/data_srv/oracle
set path=( $path /usr/ucb )
if ( `whoami` == "root" ) then
su - oracle -c "$ORACLE_HOME/bin/dbshut_ilink >& $ORACLE_HOME/rdbms/log/dbstop.log"
else
$ORACLE_HOME/bin/dbshut_ilink >& $ORACLE_HOME/rdbms/log/dbstop.log
endif
everest 23: cat /dbase/oracle/data_srv/intralink/bin/dserv_startup
#!/bin/csh -f
# THIS SCRIPT SHOULD ONLY BE RUN BY SYSTEM STARTUP
# /usr/ucb is not on the path while processing rc files (whoami is
# in /usr/ucb on sun4_solaris.
setenv ORACLE_HOME /dbase/oracle/data_srv/oracle
set path=( $path /usr/ucb )
if ( `whoami` == "root" ) then
su - oracle -c "$ORACLE_HOME/bin/dbstart_ilink >& $ORACLE_HOME/rdbms/log/dbstart.log"
else
$ORACLE_HOME/bin/dbstart_ilink >& $ORACLE_HOME/rdbms/log/dbstart.log
endif
/dbase/oracle/data_srv/intralink/export/cron_dump
#!/usr/bin/csh
set host = `hostname`
rm -f /storage/oracle_dumpfiles/$host.ilink.dmp.zip
/dbase/oracle/data_srv/intralink/export/ilink_export manager $host.ilink.dmp
/usr/bin/zip /storage/oracle_dumpfiles/$host.ilink.dmp.zip $host.ilink.dmp*
rm -f /dbase/oracle/data_srv/intralink/export/$host.ilink.dmp
rm -f /dbase/oracle/data_srv/intralink/export/$host.ilink.dmp.lst
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-18-2002 07:46 AM
тАО06-18-2002 07:46 AM
Re: Re : startup and shutdown script for oracle
Andreas
Has the correct information. you put the script in the /sbin/init.d directory. Then link it with the correct rc directory.
Mine is /sbin/rc2.d.
You probably want to do the same for the listener. I have also edited oracles dbshut script, adding immediate after the shutdown command.
I am attaching /sbin/init.d/listener
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-24-2002 11:35 PM
тАО06-24-2002 11:35 PM
Re: Re : startup and shutdown script for oracle
Thanks for all the info, I will try out, appologised for the late reply !!
Regards
Vincent