Using command-line switches

You use command-line switches to define your Sybase IQ environment. For a complete list of command-line switches and full reference information on them, see Chapter 1, “Running the Database Server” in Sybase IQ Utility Guide.

Some of the values you can set with command-line options can also be changed with the SET OPTION command. For details of this command and its options, see the Sybase IQ Reference Manual.

Displaying command-line options

To display all of the available command-line switches, enter one of the following commands at the operating system prompt:

Case sensitivity

Command-line switches are case sensitive.

Using configuration files

If you use an extensive set of command-line switches, you can store them in a configuration file, and invoke that file on a server command line. Specify switches in the configuration file as you would on the command line, with the exception that you can enter switches on multiple lines.

Sybase IQ installs several configuration files.

Table 2-1: Configuration files

Filename

Location

Use

asiqdemo.cfg

$ASDIR/demo (UNIX), %ASDIR%\demo (Windows)

Configuration file for starting the sample database, asiqdemo.

default.cfg

$ASDIR/scripts (UNIX), %ASDIR%\scripts (Windows)

Generic configuration file. This file is used for default options for start_asiq and multiplex startup. Sybase IQ copies it into each new database directory and renames it params.cfg. Changes to default.cfg (in the scripts directory) are inherited by all databases created after the file is changed.

params.cfg

Database directory

Configuration file for user-created databases. Changes to this file affect only the server that uses this particular file.

You can use these files as templates to create your own. For example, the following configuration file starts the database mydb.db on the database server named Elora, with a 32MB cache, with a 20 minute checkpoint interval, allowing anyone to start or stop databases and load data, with user connections limited to 10, a catalog page size of 4096 bytes, default client connection timeout of 72 hours, with TCP/IP as a network protocol and a specified port number of 1870:

-n Elora -c 32m -gc 20
-gd all -gl all -gm 10 -gp 4096 -ti 4400 -x tcpip(port=1870) path\mydb.db

You could use these command-line options as follows:

start_asiq @mydb.cfg

In examples throughout this chapter where there are several command-line switches, we show them for clarity on separate lines as they could be written in a configuration file. If you enter them directly on a command line, you must enter them all on one line.

NoteWhen you stop the server with the DBSTOP command, you need to specify the same parameters as when you started the server. Using a configuration file to start the server ensures that you will be able to find these parameters when you need them.

Required command-line options

While most of the command-line switches described in Chapter 1, “Running the Database Server” in Sybase IQ Utility Guide are optional, you must specify the -n switch to run Sybase IQ effectively.

For this release, the default.cfg file contains all recommended server startup values.

NoteOn all 32-bit platforms, -c 32M is recommended. On all 64-bit platforms -c 48M is recommended.

If you use TCP/IP to connect to the server, you should include network connection parameters as well. If you start the server without the parameter -x 'tcpip(port=nnnn)' set, then the server uses the default TCP/IP port number 2638. If you specify a port number that is already in use, the server assigns a different one automatically.

Default configuration file

The default configuration file contains all of the required switches. This file is used to start servers by Windows services and Sybase Central, and is the source for the params.cfg file used by the UNIX start_asiq command. You can override switches in configuration files by specifying new switches on the start_asiq command line, except for the -n servername switch.

Configuration file for the sample database

The asiqdemo.cfg file, which you use to start the sample database, sets startup switches to the recommended defaults. This file is installed in $ASDIR/demo on UNIX or %ASDIR%\demo on Windows.

Naming restrictions

Do not use hyphenated names or reserved words for database names, user identifiers or server names, even enclosed in quotation marks. For example, the following are not allowed:

grant

june-1999-prospects

“foreign”

For a complete list of reserved words (keywords), see the Sybase IQ Reference Manual.