Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

startserver script

3 posts in Unix Last posting was on 2001-05-09 15:20:08.0Z
Ivan_Gordon Posted on 2001-05-08 17:45:17.0Z
From: Ivan_Gordon
Date: Tue, 8 May 2001 13:45:17 -0400
Newsgroups: sybase.public.sqlserver.unix
Subject: startserver script
Message-ID: <6FA3E738DB298274006187E085256A46.006187EF85256A46@webforums>
Lines: 23
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com!webforums.sybase.com!news
Xref: forums-1-dub sybase.public.sqlserver.unix:482
Article PK: 1092572

Two Questions:

1) Why does the startserver script (Sybase on Solaris 8)
return the message: "Cannot execute file RUN_SYBASE"

The sybase server name is the same name as the hostname itself, and several
"RUN_xxx" files were created after the installation:

RUN_server
RUN_server_back
RUN_server_mon

The server can be started using ./RUN_server, but I don't understand
why the startserver script points to an invalid server name.


2) What is the best way to automatically configure the Sybase server(s)
to start if the system is rebooted? Should I create a S99start_sybase
script in /etc/rc2.d and/or /etc/rc3.d directories? If so, then the
script will run as root, and I think it needs to run as user "sybase"?

Thanks in advance,
Ivan


Doug Wittich Posted on 2001-05-09 15:20:08.0Z
Message-ID: <3AF96028.4AA228D8@stpaul.com>
Date: Wed, 09 May 2001 11:20:08 -0400
From: Doug Wittich <doug.wittich@stpaul.com>
X-Mailer: Mozilla 4.76 [en] (WinNT; U)
X-Accept-Language: en
MIME-Version: 1.0
Subject: Re: startserver script
References: <6FA3E738DB298274006187E085256A46.006187EF85256A46@webforums>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Newsgroups: sybase.public.sqlserver.unix
Lines: 75
NNTP-Posting-Host: portald.stpaul.com 208.201.108.75
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.sqlserver.unix:479
Article PK: 1092569

My RC2.d step s99 runs a script called db_start.ksh. This script contains a
single line to log in as Sybase and start the server.:
su - sybase -c"/pathinfo/startserver.ksh"

startserver.ksh then contains lines to do the following:

* Rename the logs and create a new log, fixing ownership and permissions on
it.
* If it is an online user, start a new xterm window, tailing the errorlog
* Start the ASE and BS servers
* Watch the errorlog for the startup to be completed
* ISQL to do whatever we want, such as taking extra engines offline,
starting rep agents, etc.

mv $SYBASE/$SYBASE_ASE/install/$SERVER.log.3
$SYBASE/$SYBASE_ASE/install/$SERVER.log.4
mv $SYBASE/$SYBASE_ASE/install/$SERVER.log.2
$SYBASE/$SYBASE_ASE/install/$SERVER.log.3
mv $SYBASE/$SYBASE_ASE/install/$SERVER.log.1
$SYBASE/$SYBASE_ASE/install/$SERVER.log.2
mv $SYBASE/$SYBASE_ASE/install/$SERVER.log
$SYBASE/$SYBASE_ASE/install/$SERVER.log.1
# create the NEW errorlog and assign appropriate privs
/usr/bin/touch $SYBASE/$SYBASE_ASE/install/$SERVER.log
/usr/bin/chmod 644 $SYBASE/$SYBASE_ASE/install/$SERVER.log
/usr/bin/chown sybase $SYBASE/$SYBASE_ASE/install/$SERVER.log
/usr/bin/chgrp dba $SYBASE/$SYBASE_ASE/install/$SERVER.log
# Move the BACKUP_SERVER errorlog to save the LAST four copies of it
mv $SYBASE/$SYBASE_ASE/install/$BSERVER.log.3
$SYBASE/$SYBASE_ASE/install/$BSERVER.log.4
mv $SYBASE/$SYBASE_ASE/install/$BSERVER.log.2
$SYBASE/$SYBASE_ASE/install/$BSERVER.log.3
mv $SYBASE/$SYBASE_ASE/install/$BSERVER.log.1
$SYBASE/$SYBASE_ASE/install/$BSERVER.log.2
mv $SYBASE/$SYBASE_ASE/install/$BSERVER.log
$SYBASE/$SYBASE_ASE/install/$BSERVER.log.1
# create the NEW BACKUP_SERVER errorlog and assign appropriate privs
/usr/bin/touch $SYBASE/$SYBASE_ASE/install/$BSERVER.log
/usr/bin/chmod 644 $SYBASE/$SYBASE_ASE/install/$BSERVER.log
/usr/bin/chown sybase $SYBASE/$SYBASE_ASE/install/$BSERVER.log
/usr/bin/chgrp dba $SYBASE/$SYBASE_ASE/install/$BSERVER.log
if tty -s ;then
/usr/openwin/bin/xterm -sb -sl 250 -n Starting_$SERVER -display $DISPLAY
-title Starting_$SERVER -geometry 125x40 -e tail -f
$SYBASE/$SYBASE_ASE/install/${SERVER}.log &
fi
echo Starting server, please check server log.
nohup $SYBASE/$SYBASE_ASE/install/startserver
-f$SYBASE/$SYBASE_ASE/install/$RUNSERVER >/dev/null &
nohup $SYBASE/$SYBASE_ASE/install/startserver
-f$SYBASE/$SYBASE_ASE/install/$RUNBSERVER >/dev/null &

sleep 30
#
#The following two lines wait until the database recovery is complete, then we
continue with rep stuff.
while [ ` egrep -c "Recovery complete"
$SYBASE/$SYBASE_ASE/install/$SERVER.log` = "0" ]

> 2) What is the best way to automatically configure the Sybase server(s)
> to start if the system is rebooted? Should I create a S99start_sybase
> script in /etc/rc2.d and/or /etc/rc3.d directories? If so, then the
> script will run as root, and I think it needs to run as user "sybase"?
>


Bret Halford Posted on 2001-05-08 22:01:08.0Z
Message-ID: <3AF86CA4.1DE13DC2@sybase.com>
Date: Tue, 08 May 2001 16:01:08 -0600
From: Bret Halford <bret@sybase.com>
Organization: Sybase, Inc.
X-Mailer: Mozilla 4.5 [en]C-CCK-MCD (WinNT; I)
X-Accept-Language: en
MIME-Version: 1.0
Subject: Re: startserver script
References: <6FA3E738DB298274006187E085256A46.006187EF85256A46@webforums>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Newsgroups: sybase.public.sqlserver.unix
Lines: 28
NNTP-Posting-Host: bret-pc.sybase.com 157.133.80.211
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.sqlserver.unix:481
Article PK: 1092571


Ivan_Gordon wrote:

> Two Questions:
>
> 1) Why does the startserver script (Sybase on Solaris 8)
> return the message: "Cannot execute file RUN_SYBASE"
>
> The sybase server name is the same name as the hostname itself, and several
> "RUN_xxx" files were created after the installation:
>
> RUN_server
> RUN_server_back
> RUN_server_mon
>
> The server can be started using ./RUN_server, but I don't understand
> why the startserver script points to an invalid server name.
>

Because if you don't specify a RUN_<servername> file when running startserver,
it
uses RUN_SYBASE as the default. Try using "startserver -f RUN_server" instead
of
just "startserver".

In a similar fashion, if you don't specify a "-I" interfaces location when
running isql, it will
use the value stored in $SYBASE. IF $SYBASE isn't set, the assumption is that
the sybase
home directory is "/usr/sybase".

If you don't specify a server name with "-S", isql will use $DSQUERY. IF
$DSQUERY
isn't set, the assumption is the server name is SYBASE.

-bret