- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: which runlevel should I place my DB2 shutdown ...
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
тАО07-11-2002 05:39 PM
тАО07-11-2002 05:39 PM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-11-2002 05:49 PM
тАО07-11-2002 05:49 PM
Solutionshould move your database and application
levels to at least 3 for stopping and 4 for
starting. If you have the database shutdown
script run in these areas you shutdown your
database before anything else and start it
last. Make sure that you also alter the
/etc/inittab file run level to 4 if you
choose to do this and run 'init q' if once
you completed your modification to the file.
/sbin/init.d holds the scripts, with
symbolic links to the
various run level directories.
/sbin/rc.4.d/S990dbstart linked to
/sbin/init.d/dbstart
/sbin/rc3.d/K010dbshut linked to
/sbin/init.d/dbstart
The scripts should have case statements for
start/stop within them. There are a number
of examples in /sbin/init.d that can be used.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-11-2002 06:06 PM
тАО07-11-2002 06:06 PM
Re: which runlevel should I place my DB2 shutdown scripts?
To startup (at run level 3 if you want it there)
# cd /sbin/rc3.d
# ln -s /sbin/init.d/db2init S999db2start
===> Assuming S999 is the last start sequence number.
To shutdown (at run level 2)
# cd /sbin/rc2.d
# ln -s /sbin/init.d/db2init K099db2shut
===> Assuming K099 is the first start sequence number.
Finally if you look at the generic "template" file it has a control variable that enable you to disable/enable the script and that file will be place in /etc/rc.config.d
Hope this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-11-2002 06:07 PM
тАО07-11-2002 06:07 PM
Re: which runlevel should I place my DB2 shutdown scripts?
===> Assuming K099 is the first shutdown/kill sequence number.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-11-2002 06:45 PM
тАО07-11-2002 06:45 PM
Re: which runlevel should I place my DB2 shutdown scripts?
Thanks for your reply, I will tried it out again.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-12-2002 04:08 AM
тАО07-12-2002 04:08 AM
Re: which runlevel should I place my DB2 shutdown scripts?
Although you already have an answer, let me provide a set of general details.
If you haven't, read either version of the document below. While the document dates to the 10.x release is remains wholly applicable in 11.x releases too. I???ll summarize the key points here.
/usr/share/doc/start_up.txt
http://docs.hp.com/hpux/onlinedocs/os/startup.pdf
The file /sbin/init.d/template is a good starting place for making your own start/stop scripts.
The /sbin/init.d directory contains all scripts used to startup and shutdown various subsystems.
Each script under /sbin/init.d should perform BOTH the startup and shutdown functions. In order to control the functionality within the script, each must also support standard arguments and exit codes. Scripts must be written for the POSIX shell. A template script may be found in /sbin/init.d/template.
There is no reason why the startup and shutdown script cannot start/kill multiple, but related processes. Remember to choose the appropriate rc
Each script in /sbin/init.d performs BOTH the startup and shutdown functions, and each will have two links pointing towards the script from /sbin/rc*.d: one for the start action and one for the stop action.
Start scripts begin with "S"; Kill (stop) scripts begin with "K". The order of execution for kill scripts is the reverse of the startup ones.
if a start script is placed in directory '/sbin/rc{X}.d' then its corresponding kill script is put in directory '/sbin/rc{X-1}.d'
A general rule-of-thumb is that the sequence number of the start script plus the sequence number of the kill script should add to 1000.
Subsystems should be killed in the opposite order they were started. This implies that kill scripts will generally not have the same numbers as their start script counterparts. If two subsystems must be started in a given order due to dependencies (e.g., S200sys1 followed by S300uses_sys1), the counterparts to these scripts must be numbered so that the subsystems are stopped in the opposite order in which they were started (e.g., K700uses_sys1 followed by K800sys1). The '1000' rule leads to this behavior.
Regards!
...JRF...