Stopping Servers

You may need to stop and restart a server to install a new version of Sybase IQ, change server server-wide database options, or close an operating system session.

DBA is the default permission level required to stop a server, but you can use the -gk startup option to change the default to ALL or NONE. Setting the permission level to ALL lets all users stop the server; setting the permission level to NONE means that no one, not even the DBA, can stop the server. In a production environment, Sybase strongly recommends that only the DBA be allowed to stop the database server.

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.

Server Shutdown Commands

Several commands shutdown the database server.

Command Description

stop_iq

Shutdowns a server completely without regard for users, connections or load process status. Syntax:

stop_iq [ options ] 

See the Utility Guide > Stopping the Database Server for complete options and syntax.

dbstop

Stops a server or database. Additional options let you stop a server, even if there are active connections.

Syntax:

dbstop [ options ] server-name 

To use dbstop to stop a server, you must specify a server-name, as well as any connection parameters you specified when you started the server.

See the Utility Guide > Stopping the Database Server for complete options and syntax.

STOP ENGINE

STOP ENGINE is a SQL statement that stops a database server.

Syntax:

STOP ENGINE engine-name [ UNCONDITIONALLY ]

The UNCONDITIONALLY argument stops a database server, even if there are client connections to the server.

See Reference: Statements and Options > SQL Statements > STOP ENGINE Statement for complete options and syntax.

Server Shutdown Methods

There are several methods to shutdown or stop a server.

To stop the server from.. Do this...

Command line

Run the stop_iq or dbstop commands.

Sybase Central

Right-click the server name and choose Stop Server.

Interactive SQL

Run the stop engine command to to stop a named database server.

Managing Processes

The stop_iq –agent command stops the IQ Agent.

Stopping Servers in Cron or At Jobs

To use stop_iq in a cron or at job, specify the full path name to the stop_iq executable and 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 accidentally shutting down the wrong server if several are running.

stop_iq –stop all
You can also use stop_iq to shut down IQ agent, for example:
stop_iq –agent –stop all

Setting –stop all shuts down all servers that were started by the user ID that starts the cron or at job.

Note: For other administrative issues, see System Administration Guide: Volume 1 > Sybase IQ Startup > Database Server Shutdown.
Related concepts
Demo Database
Running Sybase IQ Server
Starting and Stopping the Sybase Control Center Agent
Post-Installation Tasks
Related tasks
Running Interactive SQL