- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Oracle Startup / Shutdown Script
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
тАО05-19-2003 12:24 PM
тАО05-19-2003 12:24 PM
Basically what I need is a script that I can run prior to a backup kicking off, to bring all the databses down, and then after the backup job is completed to bring them back up. This isn' the normal startup/shutdown script that runs on boot in rc.
ANy help would be appreciated.
Thanks,
Gus
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-19-2003 01:46 PM
тАО05-19-2003 01:46 PM
Re: Oracle Startup / Shutdown Script
Attached is a tar file.
It contains these three files...
rwxr-xr-x 0/3 1079 Dec 24 08:08 2002 /usr/contrib/bin/shut.oracle
rwxr-xr-x 0/3 159 Dec 24 08:08 2002 /usr/contrib/bin/shutsid.sh
rwxr-x--- 0/3 1246 Nov 6 08:39 2002 /sbin/init.d/oracle
These scripts are designed to read the /etc/oratab file and shut down any instances desginated as Y or active at machine startup.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-19-2003 05:33 PM
тАО05-19-2003 05:33 PM
Re: Oracle Startup / Shutdown Script
$ORACLE_HOME/bin/dbshut
it will shutdown instance base on information in /etc/oratab.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-19-2003 07:34 PM
тАО05-19-2003 07:34 PM
Re: Oracle Startup / Shutdown Script
If you have all the working database defined in your /etc/oratab file the just call
the script $ORACLE_HOME/bin/dbshut to shutdown all the databases before the backup and then after the backup call
the script
$ORACLE_HOME/bin/dbstart
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-19-2003 07:43 PM
тАО05-19-2003 07:43 PM
Re: Oracle Startup / Shutdown Script
we normally uses dbshut and dbstart scripts in bin directory inside $ORACLE_HOME
radhakrishnan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-19-2003 11:16 PM
тАО05-19-2003 11:16 PM
Re: Oracle Startup / Shutdown Script
Just want to add that it might be wise to edit the dbshut script to do a "shutdown immediate" instead of the "shutdown [normal]"
This prevents you from having user sessions blocking the shutdown of the database and thus making the backup invalid.
("Shutdown normal" awaits the end of transactions before shutting down the instance)
rgds
Andreas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-19-2003 11:50 PM
тАО05-19-2003 11:50 PM
SolutionWe use startup and shutdown scripts found in the /etc/rc*.d directories to make things happen. Many times, these just run a script "dbstart" and "dbshut".
It is preferable to do it yourself though.
Normally, you would setup (as root) the startup/shutdown script in /etc/rc3.d and /etc/rc0.d. Mine are /etc/rc3.d/S100oracle" (startup)and "/etc/rc0.d/K100oracle" (kill).
These scripts are actually a symbolic link to the single script /etc/init.d/oracle. It contains only:
#!/bin/sh
# Start/stop processes required for oracle
case "$1" in
'start')
su - oracle8i -c orastart
su - ias902 -c webstop
;;
'stop')
su - ias902 -c webstop
su - oracle8i -c orastop
;;
esac
In my case, i have 2 Oracle accounts on my machine, one for the 9iAS and 1 for the database. I run simply a script "orastart" to start stuff for them and "orastop" to stop them. I write orastart and orastop. The nice thing about this is that if oracle8i needs to add/remove something from its startup/shutdown -- he doesn't need to get root to update the script, he just modifies orastart/stop.
The orastart script for Oracle8i is as follows:
#!/bin/csh
lsnrctl start
svrmgrl << EOF
connect internal
startup
exit
EOF
Put it in $ORACLE_HOME/bin for Oracle8i. It starts the listener, starts the database.
The shutdown script is similar, it looks like:
#!/bin/csh
lsnrctl stop
svrmgrl << EOF
connect internal
shutdown immediate
exit
EOF
If I needed to start more then one listener, I would have the appropriate commands in there to do so.
This shows how to automate the starting of virtually anything (not just Oracle stuff) on HP-UX....
Hope this helps!
regards
Yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-20-2003 11:33 AM
тАО05-20-2003 11:33 AM
Re: Oracle Startup / Shutdown Script
Same thing has happend during system shutdown.
My scripts solve both problems.
I hope that the earlier answers by myself or other help, if so, please throw the other guys some points.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-20-2003 03:00 PM
тАО05-20-2003 03:00 PM
Re: Oracle Startup / Shutdown Script
Thanks,
Brian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-20-2003 10:44 PM
тАО05-20-2003 10:44 PM
Re: Oracle Startup / Shutdown Script
I find that the commands that handle the listener require a terminal. There is probably a way around, but since the dtaa base is closed even with an open listener, I just do not bother.