- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Database Start UP
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
Forums
Discussions
Discussions
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
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
10-01-2000 05:43 PM
10-01-2000 05:43 PM
I have several scripts which i run manuall to start the DB's.
Am i able to just create the scripts in /sbin/init.d myself?
I'd appreciate any information
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-01-2000 06:11 PM
10-01-2000 06:11 PM
SolutionIf you haven't read, read either of these documents:
/usr/share/doc/start_up.txt
http://docs.hp.com/hpux/onlinedocs/os/startup.html
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.
Subsystems are 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. For example, if two subsystems must be started in a given order due to dependencies (e.g., S111sys1 followed by S222uses_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., K555uses_sys1 followed by K777sys1).
Also, kill scripts for start scripts in directory /sbin/rcN.d reside in /sbin/rc(N-1).d. For example /sbin/rc3.d/S123system2 and /sbin/rc2.d/K654system2 might be start/kill counterparts.
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-01-2000 09:37 PM
10-01-2000 09:37 PM
Re: Database Start UP
You can start and shutdown anything when system booting or shutdown.
Rename any script from /sbin/init.d and change according to your requirment and copy /etc/rc.config.d and also link the same script from /sbin/init.d to /sbin/rc1.d with K???scriptname and also link to /sbin/rc2.d with S???scriptname.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2000 05:15 AM
10-04-2000 05:15 AM
Re: Database Start UP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2000 05:42 AM
10-04-2000 05:42 AM
Re: Database Start UP
1. Edit the /etc/oratab file
DB entries must be as follows:
ORACLE_SID:ORACLE_HOME:Y
The last parameter (Y/N) determines whether you want it to start/stop the db automatically.
2. An entry for each DB you want to start/stop must have a Y at the end
3. Create a file named dbora in the /sbin/init.d directory if it does not exist yet
4. It should contain the following:
#!/bin/sh
#Set ORA_HOME to be equivalent to the ORACLE_HOME
#from which you wish to execute dbstart and dbshut
#Set ORA_OWNER to the user id of the owner of the
#Oracle database in ORA_HOME
ORA_HOME=/oracle/app/product/815
ORA_OWNER=oracle
if [! -f $ORA_HOME/bin/dbstart]
then
echo "Oracle startup: cannot start"
exit
fi
case "$1" in
'start')
#Start the Oracle databases:
#The following command assumes that the oracle login will not prompt the
#user for any values
su - $ORA_OWNER -c $ORA_HOME/bin/dbstart &
;;
'stop')
#Stop the Oracle databases:
#The following command assumes that the oracle login will not prompt the
#user for any values
su - $ORA_OWNER -c $ORA_HOME/bin/dbshut &
;;
5. Link dbora by entering
ln -s /sbin/init.d/dbora /sbin/rc0.d/K10dbora
ln -s /sbin/init.d/dbora /sbin/rc0.d/S99dbora