On UNIX and Linux platforms, you can also stop the database server using the stop_iq command as well as using dbstop. For full details on when to use stop_iq, see the section “Stopping the database server” in Chapter 2, “Running Sybase IQ” in the System Administration Guide: Volume 1.
stop_iq [ -agent | -cleanup ] [ -stop [ one | all ] ] [ -user <user_name> ] [ -version [ 12 | 15 | all ]> ] [ -wait <seconds> ]
Parameter |
Purpose |
---|---|
-agent |
Stops the IQ Agent on UNIX or Linux systems |
-cleanup |
Removes the orphan IQ process on Linux |
-stop [ one | all ] |
Removes user interaction with stop_iq. Assumes a yes response to all questions. |
-user |
Specify a user to stop server processes. |
-version |
Specify the version of Sybase IQ the switch applies to. |
-wait |
Specify the time to wait for the server to shut down before timeout expires. |
stop_iq is an interactive utility
that lists all of the servers owned by other users, then lists the
servers you own, then asks you if you want to stop your server.
If you respond Y
(yes), stop_iq shuts
down your server and closes all user connections to your server.
If you respond N
(no), stop_iq returns
to the operating system command prompt, and your server continues
to run.
When you issue stop_iq, you see this message:
"Please note that 'stop_iq' 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, do 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.
The -agent option shuts down the IQ Agent on UNIX and Linux.
The -version switch specifies the version of Sybase IQ that is being used.
The -user parameter performs two functions.
If, due to truncation or substitution, stop_iq cannot find the server or agent owned by the current user, the system manager can specify the name and id found in the process table in the -user argument to shut down the server/agent with the stop_iq utility.
A user with root privileges can shut down another user’s server or agent without having to log in as that user. The stop_iq utility has no superuser (su) or root powers, so a nonprivileged user cannot shut down a server owned by another user.
To use stop_iq in a cron or at job, use 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. This prevents the wrong server from being shut down if several are running.
stop_iq -stop all
Setting -stop all shuts down all servers that were started by the user ID that starts the server.
You can specify both options on the same command, for example:
stop_iq -agent -stop all
In a cron statement, you must specify the complete path name to the stop_iq executable.
The following example illustrates how to use stop_iq interactively to list all the servers that are running, and then shut down one server.
% stop_iq
Checking system ... The following 1 server(s) are owned by 'TEST' ## Owner PID Started CPU_Time Additional Information -- --------- ----- -------- -------- ----------------------- 1: TEST 22399 08:56:39 1:43 SVR:QA_sun7qa DB:iqdemo PORT:8888 /sun7qa1/users/QA/090513/IQ-15_1/bin64/iqsrv15 @iqdemo.cfg iqdemo.db -ti 4400 -- Please note that ’stop_iq’ 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 (22399) ... Checkpointing server (22399) ... Server shutdown.
Chapter 2, “Running Sybase IQ” in System Administration Guide: Volume 1