Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 17 » SQL Anywhere Server - Database Administration

SQL Anywhere database server executable (dbsrv17, dbeng17)

Starts and runs the database server.

Syntax
dbsrv17 [ server-options ] [ database-file [ database-options ] ...]
dbeng17 [ server-options ] [ database-file [ database-options ] ...]
Server options
Server option Description
@ data

Reads in options from a configuration file or environment variable.

-?

Displays usage information.

-al userid [ ; userid ... ]

Allow standard user authentication for specified users.

-b

Runs in bulk operations mode.

-c size

Sets initial cache size.

-ca 0

Disables dynamic cache sizing.

-cc{ + | - }

Collects information about database pages to be used for cache warming.

-cdb option [ ;option ... ]

Starts the Cockpit.

-ch size

Sets the cache size upper limit.

-chx size

Reserves address space for non-cache use.

-cl size

Sets the cache size lower limit.

-cp location [ ; location ... ]

Specifies set of directories or JAR files in which to search for classes.

-cr { + | - }

Warms the cache with database pages.

-cs

Displays cache usage in the database server messages window.

-cv{ + | - }

Controls the appearance of messages about cache warming in the database server messages window.

-dt temp-file-dir

Specifies the directory where temporary files are stored.

-ec encryption-options

Enables packet encryption.

-edi

Turns on database isolation.

-ep

Prompts for encryption key.

-es

Allows unencrypted connections over shared memory.

-f

Forces the database to start without a transaction log.

-fc filename

Specifies the file name of a DLL containing the file system full callback function.

-fips

Requires the use of FIPS-certified algorithms for database and communication encryption.

-ga

Automatically unloads the database after the last non-HTTP client connection is closed. In addition, shuts down after the last database is closed.

-gb level

Sets database process priority class to level.

-gc num Sets maximum checkpoint timeout period to num minutes.
-gd level

Sets database starting privilege.

-ge size

Sets the stack size for threads that run external functions.

-gf

Disables firing of triggers.

-gk level

Sets the privilege required to stop the server.

-gl level

Sets the privilege required to load or unload data.

-gm num

Sets the maximum number of connections.

-gn num

Sets the multiprogramming level of the database server.

-gna

Controls automatic tuning of the database server multiprogramming level.

-gnh num

Sets the maximum number of tasks that the database server can execute concurrently.

-gnl num

Sets the minimum number of tasks that the database server can execute concurrently.

-gns

Reports multiprogramming level statistics in the database server message log.

-gp size

Sets the maximum page size to size bytes.

-gr minutes

Sets the maximum recovery time.

-gss size Sets the thread stack size to size bytes.
-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.

-gta logical-processors-to-use,...

Sets which logical processors the database server can use.

-gtc logical-processors-to-use

Controls the maximum processor concurrency that the database server allows.

-gtp { 0 | 1 }

Sets topology-aware scheduling off or on.

-gu level

Sets the privilege level for utility commands: utility_db, all, none, or DBA.

-im submode

Runs the database server in memory, reducing or eliminating writes to disk.

-k

Controls the collection of Performance Monitor statistics.

-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.

-kp server-principal

Specifies the Kerberos server principal and enable Kerberos authenticated connections to the database server.

-kr server-realm (deprecated)

Specifies the realm of the Kerberos server principal and enables Kerberos authenticated connections to the database server.

-krb

Enables Kerberos-authenticated connections to the database server.

-ks

Disables the creation of shared memory that the Performance Monitor uses to collect counter values from the database server.

-ksc

Specifies the maximum number of connections that the Performance Monitor can monitor.

-ksd

Specifies the maximum number of databases that the Performance Monitor can monitor.

-m

Truncates the transaction log after each checkpoint for all databases.

-n name

Uses name as the name of the database server. The -n option is positional.

-ncs

Enables sending status events to the SAP Solution Manager using the NCS (Native Component Supportability) library.

-ncsd filename

Enables sending status events to the SAP Solution Manager using the NCS (Native Component Supportability) library, and specifies the location of the NCS configuration file to use.

-o filename

Outputs messages to the specified file.

-oe filename

Specifies file to log startup errors, fatal errors, and assertions to.

-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.

-os size

Limits the size of the message log file.

-ot filename

Truncates the database server message log file and appends output messages to it.

-p packet-size

Sets the maximum communication packet size.

-pc

Compresses all communication packets except same-computer connections.

-pf filename

Writes the process ID into the specified file.

-phl { OFF | ON | property-name, ... }

Sets history tracking for specified database server properties.

-phs { [HH:]MM:SS | size [ K | M ] | max | default }

Sets the maximum amount of memory to use for tracking property history, in allotted time or bytes.

-pt size-in-bytes

Sets the minimum network packet size to compress.

-qi

Does not display the database server system tray icon or database server messages window.

-qn

Does not minimize the database server messages window on startup.

-qp

Suppresses messages about performance in the database server messages window.

-qs

Suppresses startup error windows.

-qw

Does not display the database server messages window.

-r

Opens database in read-only mode.

-s facility-ID

Sets the Syslog facility ID.

-sb { 0 | 1 }

Specifies how the server reacts to broadcasts.

-sbx { + | - }

Controls the default disk sandbox settings for all databases started on the database server that do not have explicit disk sandbox settings.

-sf feature-list

Secures features for databases running on this database server.

-sjvm { ON | OFF }

Specifies that the database server uses one Java VM for all databases running on the database server.

-sk key

Specifies a key that can be used to enable features that are disabled for the database server.

-su password

Sets the password for the DBA user of the utility database (utility_db), or disable connections to the utility database.

-tdsl

Sets the TDS login request mode.

-ti minutes

Sets the client idle time before shutdown (default 240 minutes).

-tl seconds

Sets the default liveness timeout for clients in seconds (default 120 seconds).

-tmf

Forces transaction manager recovery for distributed transactions.

-tmt milliseconds

Sets the re-enlistment timeout for distributed transactions.

-tq time

Sets quitting time.

-ts

Sets up a database server trace session.

-u

Uses buffered disk I/O.

-ua

Turns off use of asynchronous I/O.

-uc

Starts the database server in shell mode.

-ud

Runs as a daemon.

-uf

Specifies the action that the database server takes when a fatal error or assertion failure occurs on a database server.

-ufd

Specifies the action that the database server takes when a fatal error or assertion failure occurs on a database.

-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.

-um

Opens the Server Startup Options window and displays the database server messages window if DBLauncher.app is running.

-uq

Starts the database server in shell mode but suppresses output.

-ut minutes

Touches temporary files every min minutes.

-ux

Displays the database server messages window and Server Startup Options window.

-v

Displays database server version and stop.

-vss{ + | - }

Enables and disables the Volume Shadow Copy Service (VSS).

-wc[ + | - ]

Enables write checksums for databases running on the database server.

-x list

Specifies a comma-separated list of communication protocols to use.

-xa authentication-info

Specifies a list of database names and authentication strings for an arbiter server.

-xd

Prevents the database server from becoming the default database server.

-xf state-file

Specifies the location of the file used for maintaining state information about your database mirroring system.

-xm seconds

Sets the time to check for new IP addresses in seconds. The minimum value is 10 and the default value is 0. For a portable device, the default value is 120.

-xs

Specifies server-side web services communications protocols.

-z

Provides diagnostic information about communication links.

-ze

Displays database server environment variables in the database server messages window.

-zl

Turns on capturing of the most recently prepared SQL statement for each connection.

-zn integer

Specifies the number of request log file copies to retain.

-zo filename

Redirects request logging information to a separate file.

-zoc filename

Redirects web service client information to a file.

-zp

Turns on capturing of the plan most recently used by the query optimizer.

-zr level

Turns on logging of SQL operations. The default is NONE.

-zs size

Limits the size of the request log file.

-zt

Turns on logging of request timing information.

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.

-ad log-directory-specification

Specifies the directory (or directories) containing transaction log files to be applied to the database.

-al userid [ ; userid ... ]

Allow standard user authentication for specified users of the specified database.

-ar

Applies any log files located in the same directory as the transaction log to the database.

-as

Continues running the database after transaction logs have been applied (used in conjunction with -ad or -ar).

-dh

Does not display the database when dblocate is used against this server.

-ds

Specifies the location of the dbspaces for the database.

-ek key

Specifies encryption key.

-m

Truncates (deletes) the transaction log after each checkpoint for the specified database.

-n name

Names the database. The -n option is positional.

-r

Opens the specified database(s) in read-only mode. Database modifications not allowed.

-ru

Specifies a time stamp to restore the database to during a point-in-time recovery.

-ruo

Specifies an offset in the transaction log to restore the database to during a point-in-time recovery.

-sbx { + | - }

Controls disk sandboxing for the database, which restricts read-write file operations on the database to the directory where the main database file is located and any subdirectories of this directory.

-sn alternate-server-name

Provides an alternate server name for a single database running on a database server.

-wc[ + | - ]

Enables write checksums for databases running on the database server.

-xp on

Enables database mirroring for a partner or a copy node.

Remarks

The elements of the database server command include the following:

  • Executable

    The dbeng17 command starts a personal database server.

    The dbsrv17 command starts a network database server.

    The support for TCP/IP in the network server enables you to perform tasks from your desktop computer.

    On Windows, the name of the personal database server executable is dbeng17.exe. On Unix operating systems its name is dbeng17.

    On Windows, the name of the network database server executable is dbsrv17.exe. On Linux and Unix operating systems, the name is dbsrv17.

  • Server options

    These options control the behavior of the database server for all running databases.

  • Database file

    You can specify zero, one, or more database file names. Each of these databases starts and remains available for applications.

    Caution

    The database file and the transaction log file must be located on the same physical computer as the database server or accessed via a SAN or iSCSI configuration. Database files and transaction log files located on a remote network directory can lead to poor performance, data corruption, and database server instability.

    For best results, the transaction log should be kept on a different disk from the database files.

  • Database options

    For each database file you start, you can provide database options that control certain aspects of its behavior.

Database and server options are generally case-sensitive. You should enter all options in lowercase.

The database-file specifies the database file name. If database-file is specified without a file extension, database server 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 supply no options and no database file, then on Windows operating systems a window appears, allowing you to browse to your database file.

To start a database server from a batch file, use the dbspawn utility.

The personal database server has a maximum of ten concurrent connections, uses at most four cores on one CPU for request processing, and doesn't support network client/server connections. By default, the personal database server only uses the shared memory protocol. You must use the -x option to use TCP/IP with the personal database server.

In addition, there are other minor differences, such as the default privilege level that is required to start new databases, or the privileges required to execute the CHECKPOINT statement.

By default, the database server page size is the same as the largest page size of the databases on the command line. Once the database server starts, you cannot start a database with a larger page size than the database server.

Example

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

dbeng17 "%SQLANYSAMP17%\demo.db"

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

dbsrv17 "%SQLANYSAMP17%\demo.db"

The following example starts a database server named myserver that starts with a cache size of 3 MB and loads the sample database:

dbsrv17 -c 3m -n myserver "%SQLANYSAMP17%\demo.db"