- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- database startup automatically upon server restart...
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
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
04-20-2008 09:05 PM
04-20-2008 09:05 PM
would like to seek your advice. can i call a script inside inittab to start one of our database.
the full path of the script is:
/disc01/script/monitor.sh
hope to hear from you. thanks a loy
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2008 09:25 PM
04-20-2008 09:25 PM
Re: database startup automatically upon server restart in /etc/inittab
Like a similar thread!!! click this
http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1213678
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2008 09:26 PM
04-20-2008 09:26 PM
Re: database startup automatically upon server restart in /etc/inittab
http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=44954
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2008 09:36 PM
04-20-2008 09:36 PM
Re: database startup automatically upon server restart in /etc/inittab
It is better to follow the standard way as recommended by HP.
The generic instructions are found in the document found at URL below:
http://docs.hp.com/en/934/startup.pdf
You can configure your oracle database to start using the same principles.
if you need any further assistance, please let us know.
kind regards
yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2008 09:38 PM
04-20-2008 09:38 PM
Re: database startup automatically upon server restart in /etc/inittab
also refer to scripts and additional instructions found at:
http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1218941
hope this helps too!
kind regards
yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2008 02:02 AM
04-21-2008 02:02 AM
Re: database startup automatically upon server restart in /etc/inittab
db2inst1:3456:wait:/db2/script/monitor_db2.shappreciate your advice what this 3456 represents?
i check the man, what is the best wait, respawn or once?
promis of good points, hope to hear from you. thanks a lot.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2008 02:26 AM
04-21-2008 02:26 AM
SolutionThe recommendation by Yogeeraj, Ahsan and others is to NOT do this. Use the rc(2) method.
It seems all inittab buys you is that if it aborts it will restart. But something will be seriously wrong if that happens.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2008 02:35 AM
04-21-2008 02:35 AM
Re: database startup automatically upon server restart in /etc/inittab
>... but i think the script is called from oratab.
/etc/oratab is just a reference file. If you read the comments in the header of the file, you will understand it properly.
> db2inst1:3456:wait:/db2/script/monitor_db2.shappreciate your advice what this 3456 represents?
If you run 'man inittab', you would get the following info.
The inittab file is composed of entries that are position-dependent and have the following format:
id:rstate:action:process
So 3456 is the rstate value.
"rstate" defines the run level in which this entry is to be processed. Run levels correspond to a configuration of processes in the system where each process spawned by
boot init is assigned one or more run levels in which it is allowed to exist. Run levels are represented by a number in the range 0 through 6.
So your script is configured to run at either of runlevels 3,4,5 and 6.
> I check the man, what is the best wait, respawn or once?
it will definitely depend on the login that you are trying to implement.
AS you have already seen in the man pages.
"once" is
when boot init enters a run level that matches the entry's rstate,start the process and do not wait for its termination. When it dies, do not restart the process. If boot init enters a new run level but the process is still running from a previous run level change, the process is not restarted.
Hope this helps!
kind regards
yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-28-2008 08:25 PM
04-28-2008 08:25 PM
Re: database startup automatically upon server restart in /etc/inittab
sybaseiq:3456:wait:/INSIDES_01/script/monitor_sybaseiq.sh
is it because of the system state is wait? i see respawn and once, i feel wait is ok. please let me know if it is not sufficient.
thanks a lot. hope to hear from you. promise of good points.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-28-2008 08:41 PM
04-28-2008 08:41 PM
Re: database startup automatically upon server restart in /etc/inittab
as mentioned earlier, this is a very unconventional way of starting your application processes at least on hp-ux.
please try the example as provided in my post found at: http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1218941
if you need any further assistance, do let us know.
kind regards
yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-28-2008 08:41 PM
04-28-2008 08:41 PM
Re: database startup automatically upon server restart in /etc/inittab
>>i've put this entry inside my /etc/inittab, but when the server restart the it didn't run the script:
sybaseiq:3456:wait:/INSIDES_01/script/monitor_sybaseiq.sh
It's better to put it in rc* directory rather than /etc/inittab file. it's been sometimes dangerous to put files there.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-28-2008 09:04 PM
04-28-2008 09:04 PM
Re: database startup automatically upon server restart in /etc/inittab
/etc>ls -la |grep rc
-r--r--r-- 1 bin bin 635 Mar 26 2004 rc.config
drwxr-xr-x 2 bin bin 8192 Apr 5 12:38 rc.config.d
-rw-r--r-- 1 root root 122691 Apr 28 17:38 rc.log
-rw-r--r-- 1 root root 140181 Apr 28 17:37 rc.log.old
after that, i go to rc.config.d, i can see all the files inside as attached.
would really appreciate your close guide. where to edit the file. hope to hear from you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-28-2008 09:13 PM
04-28-2008 09:13 PM
Re: database startup automatically upon server restart in /etc/inittab
see the structure of ding so that you can easily understand how can you do that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-28-2008 09:25 PM
04-28-2008 09:25 PM
Re: database startup automatically upon server restart in /etc/inittab
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-28-2008 09:50 PM
04-28-2008 09:50 PM
Re: database startup automatically upon server restart in /etc/inittab
#cd /sbin/rc3.d
#touch S
#ln -s /disc01/script/monitor.sh S
#chmod 755 S
example:
#touch S1000oraclsstart
#ln -s /disc01/script/monitor.sh S1000oraclsstart
#chmod S1000oraclsstart
create like this in test environment then deploy to production.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-28-2008 11:08 PM
04-28-2008 11:08 PM
Re: database startup automatically upon server restart in /etc/inittab
#cd /sbin/rc3.d
almond > ok, have found the directory
#touch S
almond > our database is sybase, 1. where can i find the sequence id, 2. oraclestart is this system definable or we can name any name
ok, will deploy on test / development server first. to test this, we need to restart the server right.
hope to hear from you. thanks a lot
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-28-2008 11:39 PM
04-28-2008 11:39 PM
Re: database startup automatically upon server restart in /etc/inittab
>>almond > our database is sybase, 1. where can i find the sequence id, 2. oraclestart is this system definable or we can name any name
1. the sequence number you can take which are not stated in /sbin/rc*.d directories.
2. you can give it any name. But this must be linked to your script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-29-2008 01:03 AM
04-29-2008 01:03 AM
Re: database startup automatically upon server restart in /etc/inittab
concerning the naming of the files, you can use any convention as long as you stick to it. The lower the sequence number, the high the priority when it comes to running of the script at that particular runlevel.
You can use the following: (examples)
rc2.d/S900oracle
rc2.d/S901sybase
then
rc1.d/K101oracle
rc1.d/K100sybase
hope this helps!
kind regards
yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-29-2008 01:08 AM
04-29-2008 01:08 AM
Re: database startup automatically upon server restart in /etc/inittab
>ok, will deploy on test / development server first. to test this, we need to restart the server right.
Yes. it is perferrable to experiment this in your test server first. You can make the scripts run only when the operating system switches runlevels, either up or down.
Shutdown and startups are more easy way to perform your tests.
You will find the startup/shutdown messages particular to these scripts in the /etc/rc.log file.
hope this helps too!
kind regards
yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-29-2008 02:05 AM
04-29-2008 02:05 AM
Re: database startup automatically upon server restart in /etc/inittab
Read rc(1M):
http://docs.hp.com/en/B2355-60130/rc.1M.html
The directory is: /sbin/init.d/
Then you symlink to the correct run level directory: /sbin/rc3.d/S###name
>ahsan:
#cd /sbin/rc3.d
#touch S
You should put the real file in /sbin/init.d/ and only symlink to rc3.d/.
You typically use the same script to start and stop and you would have two symlinks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-29-2008 03:04 AM
04-29-2008 03:04 AM
Re: database startup automatically upon server restart in /etc/inittab
as mentioned by Dennis above,
an example would be:
You can use the following: (examples)
rc2.d/S900oracle --> /sbin/init.d/oracle
rc2.d/S901sybase --> /sbin/init.d/sybase
then
rc1.d/K101oracle --> /sbin/init.d/oracle
rc1.d/K100sybase --> /sbin/init.d/sybase
Of course, the contents of these scripts should be as per conventions (see the URL mentioned by Dennis above) and also the /etc/rc.config.d/oracle and /etc/rc.config.d/sybase containing the appropriate flags to control the startup/shutdown.
hope this helps too!
kind regards
yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-07-2008 02:12 AM
05-07-2008 02:12 AM
Re: database startup automatically upon server restart in /etc/inittab
#pwd
/sbin/rc3.d
#ls -lrt
lrwx------ 1 root sys 32 May 7 17:42 S901monitor_sybaseiq.sh -> /sbin/init.d/monitor_sybaseiq.sh
the database script is:
#pwd
/sbin/init.d
#ls -lrt
-rwxr-xr-x 1 root sys 289 May 7 17:41 monitor_sybaseiq.sh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-07-2008 02:29 AM
05-07-2008 02:29 AM
Re: database startup automatically upon server restart in /etc/inittab
yes, the permission should be 755.
Don't forget to fillup the unassigned points area. :)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-07-2008 02:40 AM
05-07-2008 02:40 AM
Re: database startup automatically upon server restart in /etc/inittab
hope to hear from you. thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-07-2008 02:58 AM
05-07-2008 02:58 AM