Stops a database or database server.
dbstop [ options ] [ server-name ]
Read in options from the specified environment variable or configuration file. See Using configuration files.
If you want to protect passwords or other information in the configuration file, you can use the File Hiding utility to obfuscate the contents of the configuration file. See File Hiding utility (dbfhide).
|-c "keyword=value; ..."||
Specify a connection string. When stopping a network server, the connection string must include a user ID that has permissions to stop the server. By default, DBA authority is required on the network server, and all users can shut down a personal server, but the -gk server option can be used to change this.
|-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. This is equivalent to including Unconditional=YES in the connection parameters.|
Specify the name of a database server running on the current computer. The database server must be started so that no permissions are required to shut it down. The personal database server starts in this mode by default. For the network database server, you must supply the -gk all option. See -gk server option.
If you supply a server name, do not supply connection parameters as well.
The Stop Server utility stops a database server. You can use the -d option to stop a specified database.
The Stop Server utility can only be run at a command prompt. In windowed environments, you can stop a database server by clicking Shut Down on the database server messages window.
Options let you control whether a server is stopped, even if there are active connections, and whether to stop a server or only a database.
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 want to shut down the server. The -x and -y options can be used to change this behavior.
If dbstop is able to stop the database server, dbstop does not complete until all databases have stopped running, and the database server has been stopped enough so that another server could be started with the same name and databases. When dbstop successfully completes, the database server process may still be running, and some of its resources, such as the output file specified by the -o server option, may still be in use.
Exit codes are 0 (success) or non-zero (failure). See Software component exit codes.
If you want to use the SQLCONNECT environment variable with dbstop, you should specify the -c option. Otherwise, you can get unexpected results.
You are running the server named myserver without a database. To stop the server, specify the utility database as a DatabaseName (DBN) connection parameter:
dbstop -c "UID=DBA;PWD=sql;ENG=myserver;DBN=utility_db"
You are running the server named myserver with the database demo.db started. To stop the server and database:
dbstop -c "UID=DBA;PWD=sql;ENG=myserver"
You are running a personal server named myserver. To stop the server and databases even if there are connections:
dbstop -y myserver
You are running a server named myserver with the database demo.db. To stop only the database named demo, but not other databases or the server itself, execute the following command:
dbstop -c "UID=DBA;PWD=sql;ENG=myserver;DBN=demo" -d
|Discuss this page in DocCommentXchange.
Send feedback about this page using email.
|Copyright © 2009, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.1|