ASA Database Administration Guide
The Database Server
Start a personal database server or network database server.
{ dbeng9 | dbsrv9 } [
server-options ] [
database-file [
database-options ] ...]
load dbsrv9 [
server-options ] [
database-file [
database-options ] ...]
Server Option | Description |
---|---|
@environment-variable | Read in options from an environment variable. See @environment-variable server option. |
@filename | Read in options from a configuration file. See @filename server option. |
-? | Display usage information. See -? server option. |
-b | Run in bulk operations mode. See -b server option. |
-c size | Set initial cache size. See -c server option. |
-ca 0 | Disable dynamic cache sizing [Windows NT/2000/XP, Windows 95/98/Me, UNIX]. See -ca server option. |
-ch size | Set the cache size upper limit [Windows NT/2000/XP, Windows 95/98/Me]. See -ch server option. |
-cl size | Set the cache size lower limit [Windows NT/2000/XP]. See -cl server option. |
-cs | Display cache usage in database server window. See -cs server option. |
-ct { + | - } | Turn character-set translation on and off [not NetWare or Windows CE]. See -ct server option. |
-cw | Enable use of Address Windowing Extensions on Windows 2000 and Windows XP for setting the size of the database server cache. See -cw server option. |
-d | Use POSIX I/O [NetWare]. See -d server option. |
-ec encryption-options | Enable packet encryption [network server]. See -ec server option. |
-ep | Prompt for encryption key. See -ep server option. |
-ga | Automatically unload the database after the last connection closed. In addition, shut down after the last database is closed [Not NetWare]. See -ga server option. |
-gb level | Set database process priority class to level [Windows NT/2000/XP]. See -gb server option. |
-gc num | Set maximum checkpoint timeout period to num minutes. See -gc server option. |
-gd level | Set database starting permission. See -gd server option. |
-ge size | Set the stack size for threads that run external functions [not UNIX]. See -ge server option. |
-gf | Disable firing of triggers. See -gf server option. |
-gk level | Set the permission required to stop the server. See -gk server option. |
-gl level | Set the permission required to load or unload data. See -gl server option. |
-gm num | Set the maximum number of connections. See -gm server option. |
-gn num | Set the maximum number of concurrent requests the database server can handle at one time. See -gn server option. |
-gp size | Set the maximum page size to size bytes. See -gp server option. |
-gr minutes | Set the maximum recovery time to num minutes. See -gr server option. |
-gss size | Set the thread stack size to size bytes [not applicable to Windows]. See -gss server option. |
-gt num | Set the number of operating processors used by the database server. See -gt server option. |
-gu level | Set the permission level for utility commands: utility_db, all, none, or DBA. See -gu server option. |
-gx | Set the number of operating system threads assigned to the database server process. [Windows NT/2000/XP, Windows 95/98/Me]. See -gx server option. |
-m | Truncate the transaction log after each checkpoint, for all databases. See -m server option. |
-n name |
Use name as the name of the database server. Note that the -n switch is positional. See -n server option.
|
-o filename | Output messages to the specified file. See -o server option. |
-oe filename | Filename to log startup errors, fatal errors and assertions to. See -oe server option. |
-os size | Limit the size of the log file for messages. See -os server option. |
-p packet-size | Set the maximum network packet size [network server]. See -p server option. |
-pc | Compress all connections except same-machine connections. See -pc server option. |
-pt size_in_bytes | Set the minimum network packet size to compress. See -pt server option. |
-qi | Do not display database server tray icon or screen. See -qi server option. |
-qp | Suppress messages about performance in the database server window. See -qp server option. |
-qs | Suppress startup error dialogs. See -qs server option. |
-qw | Do not display database server screen. See -qw server option. |
-r | Opens database in read-only mode. See -r server option. |
-s | Set the syslog facility ID [UNIX]. See -s server option. |
-sb { 0 | 1 } | Specify how the server reacts to broadcasts. See -sb server option. |
-sc | Disable the shared memory port, and enable Named Pipes. [Windows NT/2000/XP]. See -sc server option. |
-ti minutes | Client idle time before shutdown—default 240 minutes. See -ti server option. |
-tl seconds | Default liveness timeout for clients in seconds—default 120 seconds. See -tl server option. |
-tmf | Force transaction manager recovery for distributed transactions [Windows NT/2000/XP]. See -tmf server option. |
-tmt milliseconds | Set the reenlistment timeout for distributed transactions [Windows NT/2000/XP]. See -tmt server option. |
-tq time | Set quitting time [network server]. See -tq time server option. |
-u | Use buffered disk I/O. See -u server option. |
-ud | Run as a daemon [UNIX]. See -ud server option. |
-ut minutes | Touch temporary files every min minutes [UNIX]. See -ut server option. |
-v | Display database server version and stop. See -v server option. |
-x list | Comma-separated list of communication links to try. See -x server option. |
-y | Run as a Windows 95/98/Me service [Windows 95/98/Me]. See -y server option. |
-z | Provide diagnostic information on communication links [network server]. See -z server option. |
-zl | Turn on capturing of the most recently-prepared SQL statement for each connection. See -zl server option. |
-zo filename | Redirect request-level logging information to a separate file. See -zo server option. |
-zr { all | SQL | none } | Turn on logging of SQL operations. The default is NONE. See -zr server option. |
-zs size | Limit the size of the log file used for request-level logging. See -zs server option. |
Recovery Option | Description |
---|---|
-a filename | Apply the named transaction log file. See -a recovery option. |
-f | Force the database to start without a transaction log. See -f recovery option. |
Database Option | Description |
---|---|
-ek key | Specify encryption key. See -ek database option. |
-m | Truncate (delete) the transaction log after each checkpoint for the specified database. See -m database option. |
-n name |
Name the database. Note that the -n switch is positional. See -n database option.
|
-r | Opens the specified database(s) in read-only mode. Database modifications not allowed. See -r database option. |
The dbeng9 command starts a personal database server. The dbsrv9 command starts a network database server.
The amount of cache memory available to the database server can be a key factor in affecting performance. The database server takes an initial amount of cache memory that is either specified by the -c
option or is a default value.
For information on the default cache size, see -c server option.
On Windows NT/2000/XP, Windows 95/98/Me, and UNIX, the database server automatically takes more memory for use in the cache as needed, determined by a heuristic algorithm.
For more information, see Using the cache to improve performance.
You can use database options to configure the upper cache limit: see -ch server option. As well, you can force the cache to remain at its initial amount: see -ca server option.
The personal database server has a maximum of ten concurrent connections, uses at most two CPUs for request processing, and does not support network client/server connections.
In addition, there are other minor differences, such as the default permission level that is required to start new databases, or the permissions required to execute the CHECKPOINT statement.
Both personal and network database servers are supplied for each supported operating system, with the following exceptions:
Novell NetWare Only the network server is supplied.
Windows CE Only the network server is supplied. The support for TCP/IP in the network server enables you to carry out tasks from your desktop machine, including database management, with Sybase Central.
In NetWare, the database file and the transaction log file must be on a NetWare volume, and the paths must be fully specified. NetWare allows you to have volumes that span two or more hard disks.
Database file The database-file specifies the database filename. If database-file is specified without a file extension, Adaptive Server Anywhere looks first for database-file with extension .wrt (a write file) followed by database-file with extension .db.
If you use a relative path, it is read relative to the current working directory. You can supply a full path. Also, you can supply a path that conforms to the Universal Naming Convention (UNC) format:
\\server\volume\path\file.ext
If you run the database server as a Windows service, you can suppress Windows event log entries by setting a registry entry. The registry entry is
Software\Sybase\Adaptive Server Anywhere\9.0
To control event log entries, set the EventLogMask key, which is of type REG_DWORD. The value is a bit mask containing the internal bit values for the different types of event messages:
errors EVENTLOG_ERROR_TYPE 0x0001 warnings EVENTLOG_WARNING_TYPE 0x0002 information EVENTLOG_INFORMATION_TYPE 0x0004
For example, if the EventLogMask key is set to zero, no messages appear at all. A better setting would be 1, so that informational and warning messages do not appear, but errors do. The default setting (no entry present) is for all message types to appear.
Network communications parameters
The database server supports quiet mode. You determine how quiet you want the server to operate, ranging from suppressing messages or the icon in the system tray, to complete silence. To operate a completely silent database server on Windows, specify the -qi -qs options. With these options set, there is no visual indication that the server is running, as all icons and all possible startup error messages are suppressed. If you run the database server in quiet mode, you can use either (or both) the -o or -oe options to diagnose errors.
Note that the -qi and -qs options do not suppress error dialogs caused by the -v (version) and -ep (prompt for database encryption password) server options.
Database server options
Recovery options
Database options