Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Startup Script for Sybase ver 12.0 on unix ver 11.0

Status
Not open for further replies.
Jun 26, 2002
102
US
I am trying to write a startup script for Sybase ver 12.0. I have a file that has the path, variables, and then the executable. It is linked to /sbin/rc2.d/S900sybase. But when i reboot it goes thru the reboot to the start/stop list and then all i get is dots going across the screen and about every 10 minutes a process will start..
I would appreciate any help or ideas..please..
thnxs
 

Try this:

substitute FOO for correct database name.

#!/bin/sh
#
# Startup script for Sybase SQL server
#

#
# Path to Sybase and install.
#
SYBASE=/usr/sybase

ISQL=$SYBASE/bin/isql

INSTALL=$SYBASE/install

export SYBASE ISQL INSTALL

case "$1" in
'start')
#
# Sybase server startup.
#
su sybase -c "$INSTALL/startserver -f $INSTALL/RUN_FOO -f $INSTALL/RUN_FOO_BACKUP &"
;;

'stop')
#
# Sybase server shutdown.
#
$ISQL -S FOO -U sa -P password > /dev/console 2>&1 <<-'END'
shutdown SYB_BACKUP
go
shutdown
go
END
;;

*)
#
# Invalid param.
#
echo &quot;Usage: /sbin/init.d/sybase { start | stop }&quot;
;;
esac

 
I have setup the script to run, but when i do /sbin/init.d/sybase start, only backupserver starts, and when i do /sbin/init.d/sybase stop, it tries to shutdown the unix box...if you have any more ideas please let me know..
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top