User's Guide
PART 1. Working with Databases
CHAPTER 1. Running the Database Server
Adaptive Server Anywhere provides two versions of the database server:
The personal database server This executable does not support client/server communications across a network. It is provided for single-user, same-machine use(for example, as an embedded database engine. It is also useful for development work.
On Windows 95 and Windows NT the name of the personal server executable is dbeng6.exe. On Windows 3.x the name of the personal server is dbeng6w.exe, on UNIX operating systems is dbeng6.
The network database server This executable does support client/server communications across a network, and is provided for multi-user use.
On Windows 95 and Windows NT the name of the network server executable is dbsrv6.exe. On Novell NetWare the name is dbsrv6.nlm, and on UNIX operating systems it is dbsrv6.
The request-processing engine is identical in the two servers. Each supports exactly the same SQL, and exactly the same database features. The main differences are as follows:
Network protocol support Only the network server supports communications across a network
Number of connections There is a limit of ten simultaneous connections for the personal server. The limit for the network server depends on your license.
Number of CPUs The personal database server uses no more than two CPUs for request processing.
Default number of internal threads The number of requests that the server can process at one time is configurable using the -gn command-line switch. The default number is different, however.
For information on database server command-line switches, see The database server.
Startup defaults The startup defaults are slightly different for the two servers, to reflect their use as a personal server and a server for many users.
You can start a personal server running on a single database very simply. For example, on most operating systems you can start a personal server and load the sample database by running the following command in the Adaptive Server Anywhere installation directory:
dbeng6 asademo
The personal server is the executable dbeng6.exe, and the sample database is the file asademo.db.
You can enter a command such as the one above in several ways, depending on your operating system:
You can type it at a system command prompt.
You can place the command in a shortcut or desktop icon.
You can run the command in a batch file.
You can include the command as a startline parameter in a connection string.
There are slight variations in the basic command from platform to platform, described in the following section.
You can also start a personal server using a database file name in a connection string. For more information, see Connecting to an embedded database.
The way you start the database server varies slightly depending on the operating system you are using. This section describes how to enter command lines in for the simple case of running a single database with default settings, on each of supported operating system.
The commands here start the personal server (dbeng6). To start a network server, simply replace dbeng6 with dbsrv6. The network server is not available on Windows 3.x.
If the starting directory contains the database file, you do not need to specify the path.
If you do not specify a file extension in database-file, the extension .db is assumed.
You can use a Program Manager icon to hold a command line, or enter the following command at the command prompt:
dbeng6 path\database-file
To start the server in a separate session, use the Windows NT start command:
start dbeng6 path\database-file
You can use a Program Manager icon to hold a command line, or enter the following command at the command prompt:
dbeng6 path\database-file
You can use a Program Manager icon to hold a command line, or enter the following command line in the Run dialog box:
dbeng6w path\database-file
You can run only one Windows 3.x server on a given computer at one time. There is no network server for Windows 3.x.
You can use an icon on the desktop to hold a command line, or enter the following command at an OS/2 command line prompt:
dbeng6 path\database-file
The database server is a not a Presentation Manager application. It runs in a full screen or windowed OS/2 session. To start the server in a separate session, use the OS/2 START command:
start dbeng6 path\database-file
You can put a command line into your startup.cmd or into your startup folder so that the server is automatically started each time you start OS/2.
The database server can be started with the following command:
dbeng6 path/database-file
There is no personal server for Novell NetWare, just a network server.
The database server for NetWare is a NetWare Loadable Module (dbsrv6.nlm). An NLM is a program that you can run on your NetWare server.
You can load a database server on your NetWare server as follows:
load dbsrv6.nlm path\database-file
The database file must be on a NetWare volume. A typical filename is of the form DB:\database\sales.db.
You can load the server from a client machine using the Novell remote console utility. See your Novell documentation for details.
You can put the command line into your Novell autoexec.ncf file so that Adaptive Server Anywhere is loaded automatically each time you start the NetWare server.
If you are running a server with a Java-enabled database, and you wish to carry out Java operations, you must allow additional cache memory for the Java VM. You can do this by setting a cache size of 8 M for development work:
dbeng6 -c 8M path/database-file
For more information on cache size, see Controlling performance and memory from the command line.
For information on memory management for Java, see Configuring memory for Java.
Although you can start a personal server in the simple way described above, there are many other aspects to running a database server in a production environment, and these are the subject of the remainder of the chapter.
You can choose from many command-line options or switches to specify such features as how much memory to use as cache, how many CPU's to use (on multi-processor machines), and the network protocols to use (network server only). The command-line switches are one of the major ways of tuning Adaptive Server Anywhere behavior and performance.
You can run the server as a service under Windows NT. This allows it to keep running even when you log off the machine.
You can start the personal server from an application, and shut it down when the application has finished with it. This is typical when the database server is employed as an embedded database.
The remainder of this chapter describes these options in more detail.