User's Guide
PART 1. Working with Databases
CHAPTER 1. Running the Database Server
You can stop the database server in the following ways:
Click Shutdown on the database server display
Using the dbstop command-line utility.
The dbstop utility is particularly useful in batch files, or for stopping a server on another machine. It requires a connection string on its command line.
If the server is a personal server started by an application connection string, it shuts down automatically by default when the application disconnects.
Start a server. For example, the following command executed from the Adaptive Server Anywhere installation directory starts a server named Ottawa using the sample database:
dbsrv6 -n Ottawa asademo.db
Stop the server using dbstop:
dbstop -c "eng=Ottawa;uid=dba;pwd=sql"
For information on dbstop command-line switches, see The DBSTOP command-line utility.
When you start a server, you can use the -gk option to set the level of permissions required for users to stop the server with dbstop. (Interactively, of course, anybody at the machine can click Shutdown on the server window.) The default level of permissions requires is dba, but you can also set the value to one of all or none.
If you close an operating system session where a database server is running, or if you use an operating system command to stop the database server, the server will not shut down cleanly. Next time the database is loaded, recovery will be required, and will happen automatically (see Backup and Data Recovery).
It is better to stop the database server explicitly before closing the operating system session. On NetWare, however, shutting down the NetWare server machine properly does stop the database server cleanly.
Examples of commands that will not stop a server cleanly include:
Stopping the process in the Windows NT or Windows 95 Task Manager Processes window.
Closing an OS/2 session in which the server is running.
Using a UNIX slay or kill command.