Collection Contents Index Some common command-line switches Loading and unloading databases pdf/chap1.pdf

User's Guide
   PART 1. Working with Databases
     CHAPTER 1. Running the Database Server       

Stopping the database server


You can stop the database server in the following ways:

Examples 

  1. 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
  2. Stop the server using dbstop:

    dbstop -c "eng=Ottawa;uid=dba;pwd=sql"

For Info     For information on dbstop command-line switches, see The DBSTOP command-line utility.

Top of page  Who can stop the server?

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.

Top of page  Shutting down operating system sessions

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:

Top of page  

Collection Contents Index Some common command-line switches Loading and unloading databases pdf/chap1.pdf