The Stop utility (dbstop)

The interactive Stop utility dbstop stops a database server.

The Stop utility is a command-line utility only, available on both UNIX and Windows. On Windows platforms, you can quickly stop a database server by clicking Shutdown on the server window or by right-clicking the server icon in the taskbar and choosing Exit from the popup menu.

Syntax

dbstop [ options ] server-name

Parameters

Table 1-6: dbstop options

Option

Description

-c “keyword=value; ...“

Connection parameters

-o filename

Log output messages to a file

-q

Quiet mode—do not print messages

-x

Do not stop if there are active connections

-y

Stop without prompting even if there are active connections

Usage

In UNIX, dbstop can shut down a server on any node on the network. The name is necessary to specify the name of the server that you wish to stop. However, any connection parameters you specified to start the server must also be specified with dbstop to stop the server. Without the proper connection parameters, dbstop does not know how to connect to the server to tell it to shutdown.

The dbstop command line options let you control whether a server is stopped, even if there are active connections.

server-name Name of the server to stop.

-c When stopping a network server, you must supply a connection string with a user ID that has permissions to stop the server. By default, DBA permission is required on the network server, and all users can shut down a personal server, but the -gk server command-line option can be used to change this.

For a description of the connection parameters, see Chapter 4, “Connection and Communication Parameters” in the Sybase IQ System Administration Guide.

The behavior of dbstop can be controlled if there are active connections on a server. If there are active connections, dbstop provides a prompt asking if you wish to shut down the server. If you specify unconditional=true on the command line, the server shuts down without prompting, even if there are active connections.

Log output messages to file (-o) Write output messages to the named file.

Operate quietly (-q) Do not print a message if the database was not running.

Do not stop if there are active connections (-x) Do not stop the server if there are still active connections to the server.

Stop without prompting (-y) Stop the server even if there are still active connections to the server.

Examples

To stop a database named asiqdemo on the server myserver:

dbstop -c "uid=DBA;pwd=SQL;eng=myserver;dbn=asiqdemo"

To stop a server myserver, regardless of the database running:

dbstop -c "uid=DBA;pwd=SQL;eng=myserver;dbn=utility_db"

See also

Chapter 2, “Running Sybase IQ” in Sybase IQ System Administration Guide