Collection Contents Index Starting the server Stopping the database server pdf/chap1.pdf

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

Some common command-line switches


This section describes some of the most common command-line switches, and points out when you may wish to use them.

It covers the following areas:

These command-line switches may be used in the StartLine connection parameter, or typed at a command prompt.

Top of page  Using configuration files

If you use an extensive set of command-line options, you can store them in a configuration file, and invoke that file on a server command line. The configuration file can contain switches on several lines. For example, the following configuration file starts the sample database, with a cache of 10 Mb, and starts the personal server named Elora.

-n Elora
-c 10M
path\asademo.db

where path is the name of your Adaptive Server Anywhere installation directory.

If you name the file sample.cfg, you could use these command-line options as follows:

dbeng6 @sample.cfg

Top of page  Naming the server and the databases

You can use the -n command-line option as a database switch (to name the database) or as a server switch (to name the server).

The server and database names are among the connection parameters that client applications may use when connecting to a database. The server name appears on the desktop icon and on the title bar of the server window.

Default names 

If no database name is provided, the default database name is the root of the database file name (the file name without the .db extension). For example, in the following command line the first database is named asademo, and the second sample.

dbeng6 asademo.db sample.db

If no server name is provided, the default server name is the name of the first database started. For example, with the above command the server is named asademo.

Naming databases 

You can name databases by supplying a -n switch following the database file. For example, the following command line starts a sample database and names it:

dbeng6 asademo.db -n MyDB

Naming the server 

You can name the server by supplying a -n switch before the first database file. For example, the following command line starts a server named Cambridge on the asademo database:

dbeng6 -n Cambridge asademo.db

If a server name is used, you can start a database server with no database loaded. The following command starts a server named Galt with no database loaded:

dbeng6 -n Galt

For Info     For information about loading databases onto a running server, see Loading and unloading databases.

Case sensitivity 

Server names and database names are case insensitive.

Top of page  Controlling performance and memory from the command line

Several command-line options can have a major impact on database server performance. The following are some of these:

Top of page  Controlling permissions from the command line

Some command-line options that control the permissions required to carry out certain global operations. These include the following:

Top of page  Setting a maximum page size

The database server cache is arranged in pages—fixed-size areas of memory. As the server uses a single cache for its lifetime (until it is shut down), all pages must have the same size.

A database file is also arranged in pages, of size 1024, 2048, or 4096 bytes. Every database page must fit into a cache page. By default, the server page size is set to be the same as the largest page size of the databases on the command line. Once the server is started, you cannot load a database that has a larger page size than the server.

If you wish to allow databases of larger page size to be loaded after startup, you can force the server to start with a specified page size using the -gp option, which can take the values 1024, 2048, or 4096.

Top of page  Running in special modes

Adaptive Server Anywhere can be run in special modes for particular purposes.

Top of page  Selecting communications protocols

Any communications between a client application and a database server require a communications protocol. Adaptive Server Anywhere supports a set of communications protocols for communications across networks and for same-machine communications.

By default, the database server starts up all available protocols. You can limit the protocols available to a database server by using the -x command-line switch. At the client side, many of the same options can be controlled using the CommLinks connection parameter.

Available protocols for the personal server 

The personal database server (dbeng6.exe) supports the following protocols:

Available protocols for the network server 

The network database server (dbsrv6.exe) supports the following protocols:

For Info     For more information on running the server using these options, see Supported network protocols.

Specifying protocols 

You can instruct a server to use only some of the available network protocols when starting up, by using the -x command-line switch. The following command starts a server using the TCP/IP and IPX protocols:

dbsrv6 -x "tcpip,ipx"

The quotes are not strictly required in this example, but are needed if there are spaces in any of the arguments to -x.

Additional parameters can be added to tune the behavior of the server for each protocol. For example, the following command line (entered all on one line) instructs the server to use two network cards, one with a specified port number.

dbsrv6 -x tcpip{MyIP=192.75.209.12:2367,192.75.209.32} path\asademo.db

For Info     For detailed descriptions of the available network communications parameters that can serve as part of the -x switch, see Network communications parameters.

Top of page  

Collection Contents Index Starting the server Stopping the database server pdf/chap1.pdf