Chapter 4 Database Administration Utilities
129
The Spawn utility
This utility is provided to start a database server in the background.
dbspawn [
switches
]
server
command
line
Switch Description
–f
Do not check for a running server
-p
Report operating system process ID
–q
Quiet mode—do not print messages
The
dbspawn
command-line utility is provided to start a server in the
background.
dbspawn
starts the server in the background and returns with an
exit code of 1 (success) or 0 (failure). If the server specified in server-
command line is already running,
dbspawn
reports failure.
The
dbspawn
utility is useful for starting a server from a batch file,
especially when subsequent commands in the batch file require a server that
is accepting requests.
If you need to provide double quotes in the command line, for example if
your database file is in a directory with spaces in it, you must provide an
extra set of quotes, and escape the quotes around the database file. For
example:
dbspawn dbeng7 "\"d:\Program Files\sa7\asademo.db\""
$ For a description of the server command line, see "The database server"
on page 14.
Do not check for a running server (–f) If a database server is already
running, the
dbspawn
command may use it. This switch forces
dbspawn
to
start a new database server each time it is run.
Report process ID (-p) The operating system process ID of the database
server process. For example:
dbspawn -p dbeng8 -n newserver
reports a message of the following form to the command line:
New process id is 306
Operate quietly (–q) Do not display output messages. This option is
available only from the command-line utility.
Syntax
Description
Switches