| UNIX/Linux Forum Archives · Rules and Guidelines · Disclaimer |
Help
Search
Members
Calendar
|
| Welcome Guest ( Log In | Register ) | Resend Validation Email |
![]() ![]() ![]() |
| marvin51796 |
|
|
Newbie ![]() Group: Members Posts: 8 Member No.: 16 Joined: 18-February 03 |
I have a RP5470 that is running HP-UX ver 11.0 64-bit, I have loaded Sybase Enterprise Edition ver 12.0 64-Bit onto it and it is running fine, I am trying to setup the startup scripts so that when the server is rebooted, Sybase will be shutdown correctly and be restarted correctly. I have created the startup scripts in /sbin/init.d linked them to /sbin/rc3.d and when you do a sybase start, or sybasebackup start/shutdown it works fine. What i cant do is get them to work when the system is rebooted. If any one has any ideas i would appreciate it.
here is the sybase backup script that i have written :unsure: #!/usr/bin/sh # # Startup script for Sybase SQL server # # Path to Sybase and install. # SYBASE=/appl/sybase;export SYBASE ISQL=/appl/sybase/OCS-12_0/bin/isql; export ISQL INSTALL=/appl/sybase/ASE-12_0/install; export INSTALL SYBASE_OCS=OCS-12_0; export SYBASE_OCS SYBASE_ASE=ASE-12_0;export SYBASE_ASE LM_LICENSE_FILE=/appl/sybase/SYSAM-1_0/licenses/license.dat:$LM_LICENSE_FILE; export LM_LICENSE_FILE SYBASE_SYSAM=SYSAM-1_0;export SYBASE_SYSAM case "$1" in "start_msg") echo "Starting SYBASE Backup Server" ;; 'start') # # Sybase server startup. /appl/sybase/ASE-12_0/install/startserver -f /appl/sybase/ASE-12_0/install/RUN_hp9000_back > /dev/console 2>&1 & ;; "stop_msg") echo "Shutting down the SYBASE Backup Server" ;; 'stop') # # Sybase Backup server shutdown. # isql -S Servername -U sa -P Junk -i /appl/sybase/ASE-12_0/install/SHUTDOWN_sybasebackup > /dev/console 2>&1 & ;; *) # # Invalid param. # echo "Usage: /sbin/init.d/sybase { start | stop }" ;; esac exit 0; |
| sleazyrob |
Posted: Mar 9 2003, 08:29 PM
|
|
User Level: 4 ![]() ![]() ![]() ![]() Group: Members Posts: 66 Member No.: 8 Joined: 17-February 03 |
Isn't it just a case of adding another sybolic link "K12whatever" in rc0.d and rc6.d ?
...Thats assuming halt/reboot runlevels are the same in HPUX as they are in Solaris/Linux. "man init" lists them on Linux and Solaris so I guess they should be documented there. |
| marvin51796 |
Posted: Mar 10 2003, 02:13 PM
|
|
Newbie ![]() Group: Members Posts: 8 Member No.: 16 Joined: 18-February 03 |
Did that already, I have several other scripts that i have written, like emailing me when the server reboots, modifications, etc etc..no problems at all..these work fine.
The problem with the sybase ones is that nothing happens...There is one line in the rc.log that says starting script and thats it..nothing else, no errors, no completition, nothing at all. I guess i am just asking for any ideas, comments, or if anyone has seen anything like this with an other scripts that they have written. here is what is written in /etc/rc.log when the server reboots.. Starting SYBASE Server Output from "/sbin/rc3.d/S999sybase start": ---------------------------- |
| sleazyrob |
Posted: Mar 10 2003, 10:01 PM
|
||||
|
User Level: 4 ![]() ![]() ![]() ![]() Group: Members Posts: 66 Member No.: 8 Joined: 17-February 03 |
So running:
exactly _as root_ stops and starts sybase sucessfully outside of these scripts? Sybase runs as user "sybase" on all our Solaris production servers, is this not the case on HPUX? Just a guess but some stuff refuses to run as root for security reasons. Here is the rc script from one of the machines showing the su to that user. Hope this helps?
Rob |
||||
| marvin51796 |
Posted: Mar 11 2003, 02:57 PM
|
|
Newbie ![]() Group: Members Posts: 8 Member No.: 16 Joined: 18-February 03 |
I will try this and get back to you, thanks
|
| marvin51796 |
Posted: May 15 2003, 06:06 PM
|
|
Newbie ![]() Group: Members Posts: 8 Member No.: 16 Joined: 18-February 03 |
I was able to get them to run, by removeing ths su command and just leaving it as a basic command to be executed. luckily for me i was able to test this when the halon system dumped the other day and shut everything down, but when the Hp9000 came backup so did sybase.
Thanks for everyones help, advice or just thought. Thanks again :D |
![]() |
![]() ![]() ![]() |