![]() | ![]() |
Home |
|
|
ASA User's Guide |
|
| Part 1 Working with Databases |
|
| Chapter 1: Running the Database Server |
|
| Stopping the database server |
You can stop the database server by:
Clicking 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.
Letting it shut down automatically by default when the application disconnects. (This only works if the server is a personal server started by an application connection string.)
Pressing 'q' on the server display window on UNIX and Netware machines.
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
-gkoption 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 required 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 shuts down, but not cleanly. Next time the database loads, recovery will be required, and happens 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.
Using a UNIX
slayor
killcommand.
|
|