How to stop the server

The preferred ways to stop the database server are:

Normally, you should not shut down a server while it is still connected to one or more clients. If you try this, you get a warning that any uncommitted transactions will be lost. Disconnect or close all the clients and try again.

You can also stop the database server in the following ways:

Example — Stop a server with stop_asiq

The following example uses the stop_asiq utility in a UNIX operating system command line to shut down an Sybase IQ server and close all user connections to it.

When you issue the stop_asiq command, Sybase IQ lists all the servers owned by other users, followed by the server(s) you own. It then asks if you want to stop your server. For example:

% stop_asiq
Checking system for ASIQ 12 Servers ... 
The following 3 server(s) are owned by other users.

##     Owner    PID   Started  CPU_Time
 -- ---------  -----  --------  --------  -----------------------
        hsin  19895    Mar.21      1:33  
start_asiq -c 32m -gd all -gl all -gm 10 -gn 25 -gp 4096 -ti 4400  
-n hsin -x tcp
qadaily  24754  01:25:07   1286:53  
start_asiq -gn 25 @/exp1/new.cfg asiqdemo.db 
-o /exp1/qa
wb  28350    Apr.11      0:20  
start_asiq -gn 25 @asiqdemo.cfg -o
/exp1/wb/mysybase12/asiq1

The following 1 server(s) are owned by ’janed’
##     Owner    PID   Started  CPU_Time 
-- ---------  -----  --------  --------  -----------------------
1:     janed   2838  15:11:37      0:07  
start_asiq -c 32m -gd all -gm 10 -gn 25 -gp 4096 -ti 4400 -tl 300 @asiqdemo.cfg

--
	Please note that ’stop_asiq’ will shutdown a server completely 
	without regard for users connections or load processes status. 
	For a finer level of detail the utility ’dbstop’ has the options 
	to control whether a server is stopped based on active connections.

Do you want to stop the server displayed above <Y/N>? 

To shut down the server, type Y (yes). Messages like the following display:

Shutting down server (2838) ...
Checkpointing server (2838) ...
Server shutdown.

To leave the server running, type N (no). You return to the system prompt and IQ does not shut down the server.

If no running servers were started by your user ID, Sybase IQ displays information about servers run by other users, then a message like the following:

There are no servers owned by 'janed' 

Example —Stop a server from DBISQL

The following example stops a server from DBISQL:

STOP ENGINE Ottawa UNCONDITIONALLY

The optional keyword UNCONDITIONALLY specifies that the database server will be stopped even if there are connections to it.

NoteYou can stop a server from DBISQL if you are connected as DBA to one of the databases running on that server (including the utility_db database), or if the server was started with the -gk ALL option.