Stops a database or database server.
dbstop [ options ] [ server-name ]
Reads in options from the specified environment variable or configuration file.
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.
|-c "keyword=value; ..."||
Specifies a connection string. When stopping a network server, the connection string must include a user ID that has permission to stop the server. By default, SERVER OPERATOR system privilege is required to stop a network server, and all users can shut down a personal server, but the -gk server option can be used to change this.
If you supply connection parameters, do not supply a server name as well.
|-d||Does not stop the database server. Instead, only stop the database specified in the connection string. The -gd server option controls the permissions required to stop a database file.|
|-o filename||Writes output messages to the named file.|
|-q||Runs in quiet mode—messages are not displayed.|
|-x||Does 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||Stops the server even if there are still active connections to the server. This is equivalent to including Unconditional=YES in the connection parameters.|
Specifies 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.
If you supply a server name, do not supply connection parameters as well.
When stopping a network server, you must supply a connection string with a user ID that has permissions to stop the server. By default, the SERVER OPERATOR system privilege is required to stop the network server. All users can shut down a personal server. You can use the -gk server command-line option to change the default behavior.
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 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).
To use the SQLCONNECT environment variable with dbstop, 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;Server=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;Server=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, run the following command:
dbstop -c "UID=DBA;PWD=sql;Server=myserver;DBN=demo" -d
Discuter à propos de cette page dans DocCommentXchange.
|Copyright © 2013, SAP AG ou société affiliée SAP - SAP Sybase SQL Anywhere 16.0|