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_iq

The following example uses the stop_iq 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_iq 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_iq
Checking system for IQ 15 Servers ... 
The following 2 server(s) are owned by other users.
##     Owner   PID   Started   CPU_Time  Additional Information
--     -----  -----  --------  --------  -----------------------
      handari  19895  15:43:44   183:38 
start_iq @iqdemo.cfg iqdemo.db -gn 105 -o /server1/users/surya/IQ-15_0/logfiles/surya_ibm2.001.srvlog -hn 8       pamela    409802  18:05:02    0:05  SVR:ibm1_iqdemo2 DB:iqdemo 
PORT:2678/ibm1/users/sybase/iq151/IQ-15_2/bin64/iqsrv15 @iqdemo.cfg
iqdemo.db -ti 4400 -gn 25 -o /ibm1/users/sybase/iq151/IQ
15_2/logfiles/ibm64qa_iq
The following 1 server(s) are owned by 'kermit'
##     Owner    PID   Started   CPU_Time  Additional Information 
-- ---------   -----  --------  --------  -----------------------
1:     kermit  422034  15:11:37     0:07  SVR:myserver_iqdemo 
DB:iqdemo PORT:2638 /myserver/users/sybase/iq151/IQ-15_2/bin64/iqsrv15
@iqdemo.cfg iqdemo.db -ti 4400 -gn 25 -o /myserver/users/sybase/iq151/IQ-
15_2/logfiles/myserver_iq
start_iq -c 32m -gd all -gm 10 -gn 25 -gp 4096 -ti 4400 -tl 300 @iqdemo.cfg

--
	Please note that 'stop_iq' will shut down a server completely 
	without regard for users connections or load processes status. 
	For more control, use the 'dbstop' utility, which has options 
	that control stopping servers 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 (422034) ...
Checkpointing server (422034) ...
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 'kermit' 

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.