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

Some of the values you can set with command-line options can also be changed with the SET OPTION command. For details, see Chapter 2, “Database Options,” and SET OPTION statement in Reference: Statements and Options.

Displaying command-line options

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

start_iq -h

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 provides the following configuration files:

Table 2-1: Configuration files

File name

Location

Use

default.cfg

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

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

params.cfg

Database directory

Configuration file created if the database was created by Sybase Central for user-created databases. Changes to this file affect only the server that uses this particular file.

iqdemo.cfg

$IQDIR15/data/demo (UNIX), %IQDIR15%\data\demo (Windows)

Starts the demo database, sets startup switches to the recommended defaults.

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_iq @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 Utility Guide are optional, you must specify the -n switch to run Sybase IQ effectively.

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 fails to start.

Default configuration file

The default configuration file (default.cfg) 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_iq command. You can override switches in configuration files by specifying new switches on the start_iq command line, except for the -n servername switch.

Configuration file for the demo database

The iqdemo.cfg file, which you use to start the demo database, sets startup switches to the recommended defaults. This file can be created when you create the demo database using scripts provided by the Sybase IQ.

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 “Reserved words” in Chapter 2, “SQL Language Elements,” in Reference: Building Blocks, Tables, and Procedures.