The SQL Anywhere database server

Starts a personal database server or network database server.

Syntax
{ dbeng11 | dbsrv11 } 
 [ server-options ] [ database-file [ database-options ] ...]
Server options
Server option Description
@data Reads in options from a configuration file or environment variable. See @data server option.
-? Displays usage information. See -? server option.
-b Runs in bulk operations mode. See -b server option.
-c size Sets initial cache size. See -c server option.
-ca 0 Disables dynamic cache sizing [Windows, Unix, Mac OS X]. See -ca server option.
-cc { + | - } Collects information about database pages to be used for cache warming. See -cc server option.
-ch size Sets the cache size upper limit [Windows, Unix, Mac OS X]. See -ch server option.
-cl size Sets the cache size lower limit [Windows, Unix, Mac OS X]. See -cl server option.
-cm size Specifies the amount of address space allocated for an Address Windowing Extensions (AWE) cache [Windows]. See -cm server option.
-cp location[ ;location ... ] Specifies set of directories or jar files in which to search for classes. See -cp server option.
-cr { + | - } Warms the cache with database pages. See -cr server option.
-cs Displays cache usage in the database server messages window. See -cs server option.
-cv { + | - } Controls the appearance of messages about cache warming in the database server messages window. See -cv server option.
-cw Enables use of Address Windowing Extensions for setting the size of the database server cache [Windows]. See -cw server option.
-dt temp-file-dir Specifies the directory where temporary files are stored. See -dt server option.
-ec encryption-options Enables packet encryption [network server]. See -ec server option.
-ep Prompts for encryption key. See -ep server option.
-es Allows unencrypted connections over shared memory. See -es server option.
-f Forces the database to start without a transaction log. See -f recovery option.
-fc filename Specifies the file name of a DLL containing the file system full callback function. See -fc server option.
-fips Requires the use of FIPS-approved algorithms for strong database and communication encryption [Windows]. See -fips server option.
-ga Automatically unloads the database after the last non-HTTP client connection is closed. In addition, shut down after the last database is closed. See -ga server option.
-gb level Sets database process priority class to level [Windows, Unix, Mac OS X]. See -gb server option.
-gc num Sets maximum checkpoint timeout period to num minutes. See -gc server option.
-gd level Sets database starting permission. See -gd server option.
-ge size Sets the stack size for threads that run external functions. See -ge server option.
-gf Disables firing of triggers. See -gf server option.
-gk level Sets the permission required to stop the server. See -gk server option.
-gl level Sets the permission required to load or unload data. See -gl server option.
-gm num Sets the maximum number of connections. See -gm server option.
-gn num Sets the maximum number of tasks that the database server can execute concurrently. See -gn server option.
-gp size Sets the maximum page size to size bytes. See -gp server option.
-gr minutes Sets the maximum recovery time. See -gr server option.
-gss size Sets the thread stack size to size bytes. See -gss server option.
-gt num Sets the maximum number of physical processors that can be used (up to the licensed maximum). This option is only useful on multiprocessor systems. See -gt server option.
-gtc logical-processors-to-use Controls the maximum processor concurrency that the database server allows. See -gtc server option.
-gu level Sets the permission level for utility commands: utility_db, all, none, or DBA. See -gu server option.
-im submode Runs the database server in memory, reducing or eliminating writes to disk. See -im server option.
-k Controls the collection of Performance Monitor statistics. See -k server option.
-kl GSS-API-library-file Specifies the file name of the Kerberos GSS-API library (or shared object on Unix) and enable Kerberos authenticated connections to the database server. See -kl server option.
-kr server-realm Specifies the realm of the Kerberos server principal and enables Kerberos authenticated connections to the database server. See -kr server option.
-krb Enables Kerberos-authenticated connections to the database server. See -krb server option.
-ks Disables the creation of shared memory that the Performance Monitor uses to collect counter values from the database server [Windows]. See -ks server option.
-ksc Specifies the maximum number of connections that the Performance Monitor can monitor [Windows]. See -ksc server option.
-ksd Specifies the maximum number of databases that the Performance Monitor can monitor [Windows]. See -ksd server option.
-m Truncates the transaction log after each checkpoint for all databases. See -m server option.
-n name Uses name as the name of the database server. Note that the -n option is positional. See -n server option.
-o filename Outputs messages to the specified file. See -o server option.
-oe filename Specifies file to log startup errors, fatal errors and assertions to. See -oe server option.
-on size Specifies a maximum size for the database server message log file, after which the file is renamed with the extension .old and a new file is started. See -on server option.
-os size Limits the size of the log file for messages. See -os server option.
-ot filename Truncates the database server message log file and appends output messages to it. See -ot server option.
-p packet-size Sets the maximum network packet size [network server]. See -p server option.

-pc

Compresses all connections except same-computer connections. See -pc server option.
-pt size_in_bytes Sets the minimum network packet size to compress. See -pt server option.
-qi Does not display the database server system tray icon or database server messages window [Windows]. See -qi server option.
-qn Does not minimize the database server messages window on startup [Windows and Linux]. See -qn server option.
-qp Suppresses messages about performance in the database server messages window. See -qp server option.
-qs Suppresses startup error windows. See -qs server option.
-qw Does not display the database server message window. See -qw server option.
-r Opens database in read-only mode. See -r server option.
-s facility-ID Sets the Syslog facility ID [Unix, Mac OS X]. See -s server option.
-sb { 0 | 1 } Specifies how the server reacts to broadcasts. See -sb server option.
-sf feature-list Secures features for databases running on this database server. See -sf server option.
-sk key Specifies a key that can be used to enable features that are disabled for the database server. See -sk server option.
-su password Sets the password for the DBA user of the utility database (utility_db), or disable connections to the utility database. See -su server option.
-ti minutes Sets the client idle time before shutdown—default 240 minutes. See -ti server option.
-tl seconds Sets the default liveness timeout for clients in seconds—default 120 seconds. See -tl server option.
-tmf Forces transaction manager recovery for distributed transactions [Windows]. See -tmf server option.
-tmt milliseconds Sets the re-enlistment timeout for distributed transactions [Windows]. See -tmt server option.
-tq time Sets quitting time [network server]. See -tq server option.
-u Uses buffered disk I/O [Windows, Unix, Mac OS X]. See -u server option.
-ua Turns off use of asynchronous I/O [Linux]. See -ua server option.
-uc Starts the database server in shell mode [Unix and Mac OS X]. See -uc server option.
-ud Runs as a daemon [Unix, Mac OS X]. See -ud server option.
-uf Specifies the action to take when a fatal error occurs [Unix, Mac OS X]. See -uf server option.
-ui Opens the Server Startup Options window and displays the database server messages window, or starts the database server in shell mode if a usable display isn't available [Linux and Mac OS X]. See -ui server option.
-um Opens the Server Startup Options window and displays the database server messages window [Mac OS X]. See -um server option.
-ut minutes Touches temporary files every min minutes [Unix, Mac OS X]. See -ut server option.
-ux Displays the database server messages window and Server Startup Options window [Linux]. See -ux server option.
-v Displays database server version and stop. See -v server option.
-vss Enables and disables the Volume Shadow Copy Service (VSS). See -vss server option.
-x list Specifies a comma-separated list of communication links to use. See -x server option.
-xa authentication-info Specifies a list of database names and authentication strings for an arbiter server. See -xa server option.
-xd Prevents the database server from becoming the default database server. See -xd server option.
-xf state-file Specifies the location of the file used for maintaining state information about your database mirroring system. See -xf server option.
-xs Specifies server side web services communications protocols. See -xs server option.
-z Provides diagnostic information on communication links [network server]. See -z server option.
-ze Displays database server environment variables in the database server messages window. See -ze server option.
-zl Turns on capturing of the most recently-prepared SQL statement for each connection. See -zl server option.
-zn integer Specifies the number of request log file copies to retain. See -zn server option.
-zo filename Redirects request logging information to a separate file. See -zo server option.
-zoc Redirects web service client information to a file. See -zoc server option.
-zp Turns on capturing of the plan most recently used by the query optimizer. See -zp server option.
-zr { all | SQL | none } Turns on logging of SQL operations. The default is NONE. See -zr server option.
-zs size Limits the size of the log file used for request logging. See -zs server option.
-zt Turns on logging of request timing information. See -zt server option.
Database options

The following options can only be specified after a database file name in the database server command.

Database option Description
-a filename Applies the named transaction log file. See -a database option.
-ad log-directory Specifies the directory containing transaction log files to be applied to the database. See -ad database option.
-ar Applies any log files located in the same directory as the transaction log to the database. See -ar database option.
-as Continues running the database after transaction logs have been applied (used in conjunction with -ad or -ar). See -as database option.
-dh Does not display the database when dblocate is used against this server. See -dh database option.
-ds Specifies the location of the dbspaces for the database. See -ds database option.
-ek key Specifies encryption key. See -ek database option.
-m Truncates (deletes) the transaction log after each checkpoint for the specified database. See -m database option.
-n name Names the database. See -n database option.
-r Opens the specified database(s) in read-only mode. Database modifications not allowed. See -r database option.
-sm Provides a database server name that can be used to access the read-only mirror database. See -sm database option.
-sn alternate-server-name Provides an alternate server name for a single database running on a database server. See -sn database option.
-xp mirroring-options Provides information to an operational server that allows it to connect to its partner and to the arbiter when database mirroring is being used. See -xp database option.
Remarks

The dbeng11 command starts a personal database server. The dbsrv11 command starts a network database server.

The database-file specifies the database file name. If database-file is specified without a file extension, SQL Anywhere looks for 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.

If you want to start a database server from a batch file, you must use the dbspawn utility. See Start Server in Background utility (dbspawn).

The personal database server has a maximum of ten concurrent connections, uses at most one CPU for request processing, and doesn't 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 one exception. On Windows Mobile, only the network server is supplied. The support for TCP/IP in the network server enables you to perform tasks from your desktop computer, including database management, with Sybase Central.

Examples

The following command starts the SQL Anywhere sample database running on a personal database server:

dbeng11 "c:\Documents and Settings\All Users\Documents\SQL Anywhere 11\Samples\demo.db"

The following command starts the SQL Anywhere sample database running on a network database server:

dbsrv11 "c:\Documents and Settings\All Users\Documents\SQL Anywhere 11\Samples\demo.db"

The following example, entered all on one line, starts a server named myserver that starts with a cache size of 3 MB and loads the sample database:

dbeng11 -c 3m -n myserver "samples-dir\demo.db"

For information about samples-dir, see Samples directory.