The preferred methods of stopping the database server in Sybase IQ are as follows:
In Sybase Central (either UNIX or Windows), right-click the server name and choose Stop Server.
To shut down servers in an IQ multiplex, open the Multiplex folder, right-click the server that needs to be stopped and choose
.In UNIX, use the stop_iq utility at the operating system command line. For details, see Utility Guide > stop_iq Database Shutdown Utility.
"Please note that 'stop_iq' will shut down a server completely without regard for users, connections, or load process status. For more control, use the 'dbstop' utility, which has options that control stopping servers based on active connections."
In Windows, click Shutdown on the database server display or right-click the IQ icon in the system tray and select Exit.
In Windows, if the server is run as a service, open the Service Manager in Control Panel. Select the service and click Stop.
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:
At the operating system command line, issue the DBSTOP command with appropriate parameters. Use the same parameters as when you started the server. Without the proper connection parameters DBSTOP does not know how to connect to the server to tell it to shut down. For details on using DBSTOP, see Utility Guide > dbstop Database Shutdown Utility.
In an Interactive SQL window or command file, issue the STOP ENGINE command to stop a named database server.
qThis command does not work if you have redirected input to a different device or if you started the server with start_iq. It only works with iqsrv15.
In a UNIX cron or at job, use stop_iq with the appropriate -stop option. The utility stops one or all servers associated with the user who starts the cron or at job depending on the parameter specified. The user must be the same one who started the server. No operator prompting occurs, and no operator action is required.
To use stop_iq in such jobs, specify the utility with the appropriate -stop option:
stop_iq -stop one
Setting -stop one shuts down a single server, when exactly one running server was started by the user ID that starts the cron or at job.
stop_iq -stop all
Setting -stop all shuts down all servers that were started by the user ID that starts the cron or at job.
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.
% 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_4/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_4/bin64/iqsrv15 @iqdemo.cfg iqdemo.db -ti 4400 -gn 25 -o /ibm1/users/sybase/iq151/IQ 15_4/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_4/bin64/iqsrv15 @iqdemo.cfg iqdemo.db -ti 4400 -gn 25 -o /myserver/users/sybase/iq151/IQ- 15_4/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.
There are no servers owned by 'kermit'
The following example stops a server from Interactive SQL:
STOP ENGINE Ottawa UNCONDITIONALLY
The optional keyword UNCONDITIONALLY specifies that the database server will be stopped even if there are connections to it.