In addition to using the dbstop command, on UNIX and Linux platforms you can also stop the database server using the stop_asiq command. For full details on when to use stop_asiq, see the section “Stopping the database server” in Chapter 2, “Running Sybase IQ” in the Sybase IQ System Administration Guide.
stop_asiq [ -agent | -cleanup ] [ -stop [one | all ] ] [ -help ]
Parameter |
Purpose |
---|---|
-agent |
Stops the IQ Agent on UNIX or Linux systems |
-cleanup |
Removes the orphan ASIQ process on Linux |
-help |
Displays stop_asiq syntax and switches |
-stop [ one | all ] |
Removes user interaction with stop_asiq. Assumes “Y” response to all questions. |
When used in a UNIX or Linux operating system command line, stop_asiq is an
interactive utility that lists all of the servers owned by other
users, lists the server(s) you own, then asks you if you want to
stop your server. If you respond Y
(yes), stop_asiq shuts
down your server and closes all users connections to your server.
If you respond N
(no), stop_asiq returns
to the operating system command prompt level and your server continues
to run.
Note that when stop_asiq is used, the following message appears:
"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."
Normally, you should not shut down a server while the server 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.
The -agent option shuts down the IQ Agent on UNIX and Linux. On Windows, the IQ Agent runs as a service and the Service Manager administers it. For more information about stopping the IQ Agent, see “Troubleshooting IQ Agent startup”in “Running Sybase IQ,” Sybase IQ System Administration Guide.
To use stop_asiq in a cron or at job, specify the utility with the appropriate -stop option:
stop_asiq -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. This prevents accidentally shutting down the wrong server if several are running.
stop_asiq -stop all
Setting -stop all shuts down all servers that were started by the user ID that starts the server. This command is compatible with Sybase IQ 12.5 if you have installed ESD 8 or higher.
You can specify both options on the same command, for example:
stop_asiq -agent -stop all
You must specify the full pathname to the stop_asiq executable in the cron statement.
The following example illustrates using stop_asiq interactively to list all the servers that are running, then shut down one server.
% 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>? Y
Shutting down server (2838) ... Checkpointing server (2838) ... Server shutdown.
Chapter 2, “Running Sybase IQ” in Sybase IQ System Administration Guide