highlighted area should be displayed with sybase env variables if not need to execute below command
syb<sid>@<hostname>:~> . ./SYBASE.sh
syb<sid>@<hostname>:~> echo $SYBASE
syb<sid>@<hostname>:~> showserver
EXAMPLE :
Showserver will not work incase of not setting
environmental variables
isql -Usa -P<password> -X -w4000
NOTE : Here the database SID is SEC
Enter the below command to see if there are any user connections .
1> sp_who
2>go
1>shutdown SYB_BACKUP
2>go
1>shutdown
2>go
If the above command
does NOT immediately dump you out of isql, you'll receive
repeating messages on
the screen like this:
shutdown waiting for 1 process(es) to
complete...
Sometimes you'll be shutting down a server in an
emergency situation and
won't have the chance to notify users or safely
kill all server jobs.
Other times you'll be shutting down specifically
to kill a job that won't die by itself.
In cases like this, you'll need to issue this
command:
(your normal shutdown request didn't work,
you'll have to open a new window with
a new isql session.
1> shutdown with nowait
2>go
This is not as "nice" a way to
shutdown the server; Sybase normally attempts to checkpoint
each
database and do some generic cleanup when getting shut down,
and a nowait shutdown doesn't allow Sybase to do
this.
In some extreme cases
even a shutdown with nowait won't work.
In these cases you'll
have to attempt to kill the jobs from Unix command line.
Execute these commands: (% represents the Unix command line for the sybase unix user)
% ps -fe | grep dataserver
sybase 9751 9750 80 14:33:04 pts/32 0:18 /export/sybase11/bin/dataserver
-d/dev/rdsk/c0t2d0s5 -sprod -e/export/sybase11/
The second field (in
this example, 9751) is the Unix process id of the Sybase process.
If you see multiple
lines returned from this "ps" command, either you have muliple
engines or
you have muliple SQL
servers on your machine. Don't kill the wrong SQL server!
If you have multiple
engines, the primary dataserver engine will look like the above example,
whereas the subservient
engines will have the keyword "ONLINE" in the process listing.
As the sybase user,
issue this command:
% kill -15 9751
then reissue the above
ps -fe command to see if the process has died.
If the -15 option didn't
kill the process, use the next resort:
% kill -9 9751
kill -9 is the ultimate
of Unix kill signals; it requests immediate death of the process id in question
Its also the most
unrecommended way to stop a Sybase server, because it allows
absolutely no Sybase
preventative pre-shutdown maintenance to occur.
In EXTREME cases, even a
sybase kill -9 won't stop the server. Odds are in these cases there is
some sort of odd Unix resource
problem that can only be cleared by having the root user
issue the kill -9 command or by rebooting the entire file server.
go to the below directory
startserver -f RUN_<SID> OR ./RUN_<SID> &
startserver -f RUN_<SID>_BS OR ./ RUN_<SID>_BS &
startserver is located at $SYBASE/$SYBASE_ASE/bin.
To start the server in single user mode so that only administrative user could log in
startserver -mf RUN_<SID>