dbstop

dbstop stops a database server. The Stop utility is a command-line utility only, available on both UNIX and Windows platforms.

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.

Syntax

dbstop [ options ] server-name 

Parameters

Table 1-3: dbstop options

Option

Description

@filename

Read in options from the specified environment variable or configuration file.

server-name

Server name of a running server.

-c “keyword=value; ...”

Connection parameters.

-d

Do not stop the database server. Instead, only stop the database specified in the connection string.

-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. You must specify a server-name, as well as any connection parameters you specified when you started 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. If you supply a server name, do not supply connection parameters as well.

-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; you can use the -gk server command-line option to change the default behavior.

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

If there are active connections, dbstop prompts whether you want 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.

-d Do not stop the database server. Instead, only stop the database specified in the connection string.

-o filename Write output messages to the named file.

-q Run in quiet mode—messages are not displayed.

-x Do not stop the server if there are still active connections to the server. Including this option prevents dbstop from prompting for confirmation if there are active connections.

-y Stop the server even if there are still active connections to the server.

Examples

To stop a database named iqdemo on the server myserver, enter:

dbstop -c "uid=DBA;pwd=sql;eng=myserver;dbn=iqdemo"

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

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

See also

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