Starting the database server

The database startup utility start_iq starts a Sybase IQ network database server.

The UNIX versions of Sybase IQ provide the script start_iq, and the Windows version of IQ provides start_iq.exe. These scripts verify that your environment is set correctly and start the server with all required switches preset to recommended defaults (along with any switches you add). The start_iq utility also includes some parameters and calculates others. For switches that are specific to your operating system, see the Installation and Configuration Guide.

NoteThe Start Database Server utility in Sybase Central provides an easy graphical interface for starting servers and is the recommended method for starting IQ multiplex servers. See Chapter 2, “Running Sybase IQ” in the System Administration Guide: Volume 1.

Syntax

start_iq [ server-options ] [ database-file 
[ database-options ], ...]

Sybase recommends that you specify the -n switch to run Sybase IQ effectively. The -n command-line switch is a server switch that names the server. For example start_iq -n myServer @iqdemo.cfg iqdemo.db. Specifying the -n switch prevents you from unintentionally connecting to the wrong server.

You can list the start_iq switches using the command:

start_iq -?

Server options parameters

The following table lists the available switches for the start_iq server options parameters.

Table 1-1: start_iq server options

Switch

Description

@filename

Read in switches from configuration file.

@envvar

Read in switches from environment variable.

-c cache-size

Set initial catalog store cache size.

-ca 0

Disable dynamic catalog store cache resizing.

-cc {+|-}

Enable or disable page collection for cache warming.

-ch size

Set catalog store cache size upper limit in bytes.

-cl size

Set the cache size lower limit in bytes.

-cm size

Set Address Windowing Extensions address space size.

-cp

Set search path for classes

-cr {+|-}

Enable or disable cache warming.

-cs

Display cache sizing statistics.

-cv {+|-}

Enable or disable cache warming status messages.

-cw

Enable use of Address Windowing Extensions on Windows 2000, Windows XP, and Windows Server 2003 for setting the size of the database server cache.

-dt dir

Directory for temporary files.

-ec encryption-options

Enable packet encryption on the network server.

-ep

Displays a dialog box that prompts you for an encryption key to start an encrypted database. Provides extra security by never allowing the encryption key to be seen in clear text.

-es

Allow unencrypted shared memory connections.

-f

Force database to start without transaction log.

-fc file

File name of DLL with filesystem full callback function.

-fips

All strong encryption done using FIPS-approved modules. This switch requires the IQ_SECURITY license.

-ga

Automatically shut down database after last connection closed.

-gb level

(Windows) Set database process priority class to level ].

-gc num

Set checkpoint timeout period to num minutes.

-gd level

Set the permission required to start and stop the database.

-ge size

(Windows) Sets the stack size for threads that run external functions.

-gf

Disable trigger firing.

-gk level

Set the permission required to stop the server.

-gl level

Set the permission required to load data.

-gm num

Set the total number of connections that the server can support at one time. If this number is greater than the number that is allowed under licensing constraints, this option has no effect. The value should approximate the number of users expected to connect to the server. Some connections are expected to be idle, while other connections are actively using the database. The default is 10 connections.

-gn integer

Set the number of execution threads to be used for the catalog store and connectivity while running with multiple users. Sybase recommends that you set the -gn value to at least 1.5 times the value of -gm.

-gp size

Set maximum page size to size bytes. size must be to the power of 2.

-gr num

Set maximum recovery time to num minutes.

-gss {integer | integerK | integerM}

Sets the stack size per SQL Anywhere thread in the server. Has no effect on Windows. The default is 64KB. The maximum size is 4MB.

-gt num

Set maximum number of physical processors to use (up to licensed maximum).

-gtc num

Set maximum processor concurrency (cores and hyperthreads).

-gu level

Utility commands permission level: utility_db, all, none, dba.

-iqfrec dbname

Open database in forced recovery mode.

-iqgovern num

Specify the number of concurrent queries.

-iqmc size

Specify the main cache size, in MB. (Overrides default)

-iqsmem size

Create a memory pool to increase heap space.

-iqmsgnum num

Specifies the number of archives of the old message log maintained by the server. Allowed values are integers 0 – 64 (inclusive). Default value is 0, which means that messages are wrapped in the main message log file. Takes effect only if -iqmsgsz or the IQMsgMaxSize server property is a value other than zero.The IQMsgNumFiles server property corresponds to -iqmsgnum and takes precedence over the value of -iqmsgnum. For information on the IQMsgNumFiles server property, see “sa_server_option system procedure” in Chapter 7, “System Procedures” of Reference: Building Blocks, Tables, and Procedures.

-iqmsgsz size

Limits the maximum size of the message log. Allowed values are integers 0-2047 (inclusive) in megabytes. The default value is 0, which specifies no limit on the size of the message file.

-iqmt num

Specify the number of threads that IQ can use on a multi-threaded system. The default is (60*numCPUS)+(2*num_conn)+5. The minimum value is 2*num_conn+5.

-iqnotemp size

Create a temporary file in place of the defined temporary dbspace. The argument to the switch specifies the file size in MB.

-iqnumbercpus

Override the number of physical CPUs with the number available to IQ. See Chapter 2, “Running Sybase IQ” in the System Administration Guide: Volume 1.

-iqpartition

Specify number of partitions in main and temp buffer caches.

-iqsmem size

Create a memory pool to increase heap space.

-iqstart N

Provide startup diagnostics for dbspaces.

-iqtc size

Specify temporary cache size, in MB. (Overrides default.)

-iqtss size

Specify the thread stack size, in KB.

-iqwmem size

Specify the size, in MB, of a special memory pool that cannot be paged for HP and Sun UNIX platforms.

-k

Instructs Sybase IQ to not collect performance statistics.

-kl file

File name for Kerberos GSS-API library.

-kr realm

Realm for Kerberos server principal.

-krb

Enable Kerberos authentication. This switch requires the IQ_SECURITY license.

-ks 0

Disable creating performance statistic shared memory.

-ksc num

Number of connections to be tracked by the performance statistic. The default is 2.

-ksd num

Number or databases to be tracked by the performance statistic. The default is 10.

-m

Truncate transaction log after checkpoint.

-n name

Use name as the name of the database server.

NoteThere are two -n options. If -n appears after a database file name, the meaning is different. See“Database options parameters”.

-o filename

Output server messages to the specified file.

-oe filename

Set file name to log startup errors, fatal errors, and assertions.

-on size

Appends “.old” to the log file name and starts a new log file with the original name when the log reaches the specified size.

-os

Specify maximum size of file for server messages.

-ot file

File name for copy of message window.

-p packet-size

Set maximum network packet size.

-pc

Compress communication packets.

-pt size

Set compression threshold.

-qi

(Windows) Control whether database server tray icon and window appear.

-qp

Do not display messages about performance in the database server window.

-qs

(Windows) Suppress startup error dialogs.

-qw

Do not display database server screen.

-s

Set the syslog facility ID (none, user, daemon, local0,..., local7) [UNIX].

-sb {0 | 1}

Specify how the server reacts to broadcasts on TCP/IP.

-sf name

Comma-separated list of features or feature sets to be secured.

-sk key

Key allowing overriding of secured features.

-su password

Specify password for utility_db, or specify “none” to disable utility_db.

-ti min

Client idle time before shutdown:—default 4400 minutes.

-tl sec

Default liveness timeout for clients in seconds—default is 120 seconds.

-tmf

Force transaction manager recovery.

-tq time

Set quitting time.

-u

Use buffered disk I/O.

-ud

Causes the process to run as a daemon in the root directory [UNIX].

-uf

Specifies the action to take when a fatal error occurs [UNIX].

-ut min

Touch temporary files every min minutes [UNIX].

-v or -v2

Display database server version.

-x list

Comma-separated list of communication links to try.

-xs

Specify server-side Web services communications protocols.

-z

Provide diagnostic information on communication links.

-ze

Display server environment variables.

-zl

Capture most-recently prepared SQL statement for each connection to a database on the server.

-zn num

Number of request log files to keep.

-zo

Specify file for logging server requests.

-zoc file

Output HTTP Web client procedure debug log to file.

-zr level

Enable server request-level logging.

-zs {integer | integerG | integerK | integerM }

Specify maximum size of file for server request logging.

If there is a problem starting the server, start_iq returns a non zero value. If you did not specify a log file after the -o switch on startup, the error is written to the first one of the following that is defined:(Windows)

Database options parameters

The following table lists the available switches for the start_iq database options parameters. These options apply only to the preceding database in the command syntax.

Table 1-2: start_iq database options

Switch

Description

-dh

Hide the database from dblocate -d.

-ds dir

Specify the directory containing all dbspaces.

-ek key

Specify database encryption key.

-m

Truncate transaction log after checkpoint

-n name

Name the database

NoteThere are two -n switches.The -n switch is positional. If this switch appears after a database file name, the switch is a database switch. Otherwise, -n is a server switch.

-sm name

Alternate server name for this database when acting as a read-only mirror.

-sn name

Alternate server name for this database.

-r

Read-only mode. Database modifications are not allowed.

Usage

-n server-name Specifies the name of the database server.

database-file Specifies the database file name. If database-file is specified without a file extension, Sybase IQ looks for database-file with extension .db.

If you use a relative path, the path is read relative to the current working directory of the server. You can supply a full path.

On Windows you can supply a path that conforms to the Universal Naming Convention (UNC) format:

\\server\volume\path\file.ext

WARNING!  The database file must be on the same machine as the database server. Managing a database file that is located on a network drive can lead to file corruption.

Server command-line switches

@filename Reads in command-line switches from the supplied file.

The file may contain line breaks, and may contain any set of command-line switches. For example, the following Windows command file holds a set of command line switches for a server named iqdemo that allows 10 connections, sets the maximum catalog page size to 4096 bytes, and loads the iqdemo database:

# iqdemo.cfg
# ------------------------------------------------
# Default startup parameters for the IQ demo database
# ---------------------------------------------------
-n  iqdemo
-x  tcpip{port=2638}
# The following parameters are also found in the configuration file
# %IQDIR!%\scripts\default.cfg.  Any parameters not specified below
# and not in the start up parameter list, will be added by start_iq
# using default.cfg as a guide.				

-c  48m
-gc 20
-gd all
-gl all
-gm 10
-gp 4096
-iqmc 32
-iqtc 24

If this configuration file is saved as c:\config.txt, the file can be used in a command line as follows:

start_iq @c:\config.txt

@environment-variable Reads in command-line switches from the supplied environment variable. The environment variable may contain any set of command line switches. For example, the first of the following pair of Windows statements sets an environment variable holding a set of command line switches and loads the sample database. The second statement starts the database server:

set envvar= -gp 4096 -gm 15 
c:\sybase\IQ-15_1\demo\start_iq -n myserver @envvar iqdemo.db

NoteIf you have both a file and an environment variable with the value of your @ command-line switch, the result is unpredictable. Use only one of these methods to set a given @ command-line switch.

-c cache-size Sets initial memory reserved for caching catalog store pages and other server information. The database server uses extra memory for caching database pages if the memory is set aside in the cache. Any cache size less than 10000 is assumed to be KB (1K = 1024 bytes). Any cache size 10000 or greater is assumed to be in bytes. You can also specify the cache size nK, nM or nP (1M = 1024 KB), where P is a percentage of the physical system memory.

The default value of -c in the default.cfg file and start_iq is 32MB (-c 32M) for Windows platforms, and 48MB (-c 48M) for UNIX platforms. For IQ databases, Sybase recommends that you use this default or set -c to a higher value.

You can use % as an alternative to P, but as most non-UNIX operating systems use % as an environment variable escape character, you must escape the % character. For example, to use 20 percent of the physical system memory, specify:

start_iq -c 20%% ...

On UNIX operating systems, if the cache size specified with -c is greater than the amount of available memory, the database server uses a maximum cache size that is calculated as follows:

If no -c switch is provided (either on the command line or using the start_iq default), the database server computes the initial catalog store cache allocation as follows:

  1. The database server uses 32MB as the minimum default cache size.

  2. The database server computes a runtime-specific minimum default cache size, which is the lesser of the following items:

    • 25% of the physical memory of the machine.

    • The sum of the sizes of the main database files specified on the command line. Additional dbspaces apart from the main database files are not included in the calculation. If no files are specified, this value is zero.

  3. The database server allocates the greater of the two values computed.

Do not use -c in the same configuration file or command line with -ch or -cl. For related information, see the -ch cache-size option below.

See also the -ca 0 option.

-ca 0 Enforces a static catalog cache size. The zero argument is required.

Ordinarily, the database server automatically takes additional cache as needed. You can disable automatic cache increase due to high server load by using -ca 0 on the command line. The cache size continues to increase if the database server would otherwise run into this error:

Fatal Error: dynamic memory exhausted 

or if the Java VM requires memory that would otherwise lead to a fatal error.

-cc Collects information about database pages to be used for cache warming the next time the database is started. By default, page collection is turned on. When collection is turned on, the database server keeps track of each database page that is requested. Collection stops when the maximum number of pages has been collected, the database is shut down, or the collection rate falls below the minimum value. Note that you cannot configure the maximum number of pages collected or specify the value for the collection rate (the value is based on cache size and database size). Once collection stops, information about the requested pages is recorded in the database so those pages can be used to warm the cache the next time the database is started with the -cr option. Collection of referenced pages is turned on by default.

-ch cache-size Limits the catalog store cache that the database server can take during automatic cache growth. By default, the upper limit is approximately the lower of 256MB and 90% of the physical memory of the machine.

You specify the cache-size using the K, M, and P characters as in the -c option. For the meaning and usage of the cache size argument and the K, M, and P characters, see -c cache-size.

In some cases the standard catalog cache size may be too small, for example, to accommodate certain queries that need a lot of parsing. In these cases, you may find it helpful to set -cl and -ch. For example, on 32-bit platforms, try these settings:

-cl 128M
-ch 256M

WARNING!  To control catalog store cache size explicitly, you must do either of the following, but not both, in your configuration file (.cfg) or on the UNIX command line for server startup:

Specifying different combinations of the parameters above can produce unexpected results.

-cl cache-size Sets a lower limit to the catalog store cache during automatic cache growth. By default the lower limit is the initial cache size.

The amount of cache memory available to the catalog store can affect performance, especially when many users are connected. You specify the cache-size using the K, M, and P characters as in the -c option. For the meaning and usage of the cache size argument and the K, M, and P characters, see -c cache-size.

For more information, see Chapter 11, “International Languages and Character Sets” in the System Administration Guide: Volume 1.

-cm size Specifies the amount of address space allocated for an Address Windowing Extensions (AWE) cache on Windows.The size is the amount of memory, in bytes. Use k, m, or g to specify units of kilobytes, megabytes, or gigabytes, respectively.

-cp Specifies set of directories or jar files in which to search for classes. This option adds directories and jar files to the classpath that the database server builds for launching the Java VM. Use ; to separate directories and jar files.

-cr Reloads (warms) the cache with database pages using information collected the last time the database was run. Cache warming is turned on by default. When a database is started, the server checks the database to see if it contains a collection of pages requested the last time the database was started. If the database contains this information, the previously-referenced pages are then loaded into the cache. Warming the cache with pages that were referenced the last time the database was started can improve performance when the same query or similar queries are executed against a database each time it is started.

-cs Displays cache size information whenever the cache size changes.

-cv Controls the appearance of messages about cache warming. When -cv+ is specified, a message appears in the database server messages window when any of the following cache warming activities occur:

-cw Enables use of Address Windowing Extensions (AWE) on Windows 2000, Windows XP, and Windows Server 2003 for setting the size of the catalog store cache.

Because Windows 2000, Windows XP, and Windows Server 2003 support Address Windowing Extensions, you can use the -cw option to take advantage of large cache sizes based on the maximum amount of physical memory in the system. Remember, though, that the size of the catalog store cache has much less impact on performance for IQ databases than the IQ main and temporary buffer caches.

Operating system

Maximum non-AWE cache size

Maximum amount of physical memory supported by Windows

Windows 2000 Professional

1.8GB

4GB

Windows 2000 Server

1.8GB*

4GB

Windows 2000 Advanced Server

2.7GB*

8GB

Windows 2000 Datacenter Server

2.7GB*

64GB

Windows XP Home Edition

1.8GB

2GB

Windows XP Professional

1.8GB

4GB

Windows Server 2003, Web Edition

1.8GB

2GB

Windows Server 2003, Standard Edition

1.8GB

4GB

Windows Server 2003, Enterprise Edition

2.7GB*

32GB

Windows Server 2003, Datacenter Edition

2.7GB*

64GB

*You must restart the operating system using the /3GB option to use a cache of this size.

When using an AWE cache, almost all of the available physical memory in the system can be allocated for the cache.

If you can set a catalog store cache of the desired size using a non-AWE cache, Sybase recommends that you do so, because AWE caches allocate memory that can only be used for the catalog store. This means that while the database server is running, the operating system and the IQ store caches cannot use the memory that is allocated for the catalog store cache.

AWE caches do not support dynamic cache sizing. Therefore, if an AWE cache is used and you specify the -ch or -cl options to set the upper and lower cache size, they are ignored.

To start a database server with an AWE cache:

If you specify the -cw option and the -c option on the command line, the database server attempts the initial cache allocation as follows:

  1. The AWE cache is no larger than the cache size specified by the -c option. If the value specified by the -c option is less than 2MB, AWE is not used.

  2. The AWE cache is no larger than all available physical memory less 128MB.

  3. The AWE cache is no smaller than 2MB. If this minimum amount of physical memory is not available, an AWE cache is not used.

When you specify the -cw option and do not specify the -c option, the database server attempts the initial cache allocation as follows:

  1. The AWE cache uses 100% of all available memory except for 128MB that is left free for the operating system.

  2. The AWE cache is no larger than the sum of the sizes of the main database files specified on the command line. Additional dbspaces apart from the main database files are not included in the calculation. If no files are specified, this value is zero.

  3. The AWE cache is no smaller than 2MB. If this minimum amount of physical memory is not available, an AWE cache is not used.

When the server uses an AWE cache, the catalog cache page size is at least 4KB, and dynamic cache sizing is disabled. On 64-bit Windows platforms, the cache page size is at least 8KB.

For more information about dynamic cache sizing, see the -ch and -cl server options.

-dt dir Specifies the directory where temporary files are stored.

-ep Displays a dialog box that prompts user to enter encryption key for running a strongly encrypted database. This option provides an extra measure of security by never allowing the encryption key to be seen in clear text. For a strongly encrypted database, you must specify either -ep or -ek, but not both. The command fails if you do not specify a key for a strongly encrypted database.

The engine cannot be a Windows service, or it must be a Windows service with the interact with desktop option turned on.

When used with supported tools, this option always prompts the user for the encryption key, even if a key is not necessary. If you know that a key is not necessary, click Cancel to continue when the dialog box prompt appears.

-es Allows unencrypted connections over shared memory.

-f Forces the database server to start after the transaction log has been lost. This option is for use in recovery situations only. If there is no transaction log, the database server performs a checkpoint recovery of the database and then shuts down—it doesn't continue to run. You can then restart the database server without the -f option for normal operation.

If there is a transaction log in the same directory as the database, the database server performs a checkpoint recovery, and a recovery using the transaction log, and then shuts down—it doesn't continue to run. You can then restart the database server without the -f option for normal operation.

-fc file Specifies the file name of a DLL (or shared object on UNIX) containing the File System Full callback function.

-fips Specifying this option forces all strong database encryption to use FIPS-approved algorithms.

-ga Specifying this switch causes the database server to automatically shut down after the last database closes.

-gb level Sets the database process priority class to level. Level must be one of idle, normal (the default), high, or maximum. The commonly used settings are normal and high. The value idle is provided for completeness, and maximum may interfere with the running of your computer.

-gc num Sets the maximum number of minutes the database server runs without doing a checkpoint on each database. The default value is 20 minutes.

-gd level Sets the permission level required to start a database on the server, or to stop a database:

You can use either uppercase and lowercase syntax for the options.

-ge size (Windows) Sets the stack size for threads running external functions, in bytes. The default is 16384 (16KB).

-gf Disables triggers.

-gk level Sets the permission level required to stop the database server:

You can use either uppercase and lowercase syntax for the options.

-gl level Sets the permission required to load data using LOAD TABLE.

The LOAD TABLE statement reads files from the database server machine.

To control access to the file system using these statements, the -gl command-line switch allows you to control the level of database permission that is required to use these statements.

Both uppercase and lowercase syntax are acceptable.

The default settings are all for servers started with start_iq and dba for other servers. Sybase recommends that, for consistency with earlier versions, you use the all value on all systems. The all setting is used in the iqdemo.cfg and default.cfg configuration files. See Table 2-1 in Chapter 2, “Running Sybase IQ” in the System Administration Guide: Volume 1.

-gm num Sets the total number of connections that the server can simultaneously support. If this number is greater than the number that is allowed under licensing and memory constraints, this switch has no effect. The value should approximate the number of users expected to connect to the server. Some connections are expected to be idle, while other connections are actively using the database. The default varies by machine capacity, but 15 is recommended.

The database server allows one extra DBA connection above the connection limit to allow a DBA to connect to the server and drop other connections in an emergency.

-gn num Sets the number of execution threads that will be used for the catalog store and connectivity while running with multiple users. This parameter applies to all operating systems and servers.

Each connection uses a thread for each request, and when the request is completed, the thread is returned to the pool for use by other connections. As no connection can have more than one request in progress at one time, no connection uses more than one thread at a time.

An exception to this rule is if a Java application uses threads. Each thread in the Java application is a database server execution thread.

On Windows, specify this parameter in the start_iq command. To calculate its value, use:

gn_value >= gm_value * 1.5

Sybase recommends that you set the -gn value to at least 1.5 times the value of -gm. Specify a minimum of 25. The total number of threads must not exceed a platform-specific maximum; see “-iqmt num” for details.

The start_iq utility sets this parameter. See the Installation and Configuration Guide for your platform for more information.

-gp size Sets the maximum page size allowed, in bytes, for the catalog store. The size specified must be 1024, 2048, 4096, 8192, 16384, or 32768. The minimum page size on all UNIX platforms is 2048 bytes. Sybase highly recommends that you set the -gp switch to at least 4096.

-gr num Sets the maximum length of time, in minutes, that the database server takes to recover from system failure.

See “RECOVERY_TIME option” in Chapter 2, “Database Options” in Reference: Statements and Options.

-gss { integer | integerK | integerM } Sets the stack size for each SQL Anywhere thread in the server. Has no effect on Windows operating systems. The default stack size per SQL Anywhere thread is 64KB. The maximum size is 4MB.

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

-gtc num Controls the maximum processor concurrency (cores and hyperthreads) that the database server allows.

-gu level Sets permission levels for commands such as CREATE DATABASE and DROP DATABASE. Set the level to one of: utility_db, all, none, dba.

The utility_db level restricts the use of these commands to only those users who can connect to the utility database. The all, none, and dba levels respectively permit all users, no users, or connected users with DBA authority to execute utility commands.

To connect to the utility database, specify utility_db as the database name (that is, there is no database file) and specify the utility database password (stored in the file util_db.ini).

-iqgovern num Sets the number of concurrent queries allowed by the server. The number of concurrent queries is not the same as the number of connections. -iqgovern can help Sybase IQ optimize paging of buffer data out to disk and avoid overcommitting memory. The default value of this switch is equal to 2 times the number of CPUs on your machine, plus 10. You may find that another value, such as 2 times the number of CPUs plus 4, provides better throughput, especially when large numbers of users are connected.

-iqmc size Specifies the main IQ store cache size in MB. The switch overrides default of 16MB, or the value, if any, set by the MAIN_CACHE_MEMORY_MB database switch. Applies to all databases started from the time the IQ server is started until the IQ server is shut down. In other words, if you start one database at server startup and another later, you need 2 * -iqmc available for the main cache. In general, Sybase recommends that you do not run multiple databases with a Sybase IQ server.

-iqmsgnum num Specifies the number of archives of the old message log maintained by the server. The value of -iqmsgnum takes effect only if the IQMsgMaxSize server property or the -iqmsgsz server startup switch is non zero. The IQMsgNumFiles server property corresponds to -iqmsgnum and takes precedence over the value of -iqmsgnum.

-iqmsgnum is an integer 0 – 64 (inclusive). The default value is 0, which means that messages are wrapped in the main message log file.

A -iqmsgnum value n greater than 0 means that the server maintains n message log archives. For example, this command specifies that the server maintain 3 archives of the message log:

start_iq -n iqdemo iqdemo.db ... <other options> ... -iqmsgsz 100 -iqmsgnum 3

For information on the IQMsgNumFiles server property, see “sa_server_option system procedure” in Chapter 7, “System Procedures” in Reference: Building Blocks, Tables, and Procedures.

For information on message log management, see “Message logging” in Chapter 1, “Overview of Sybase IQ System Administration” in the System Administration Guide: Volume 1.

-iqmsgsz size Limits the maximum size of the message log. -iqmsgsz is an integer 0-2047 (inclusive), in MB. The default value is 0, which specifies that there is no limit on message log size. The IQMsgMaxSize server property corresponds to the -iqmsgsz server switch and takes precedence over the value of -iqmsgsz.

A -iqmsgsz value n greater than 0 means that the message log can grow up to n megabytes in size. For example, the following command limits the size of the message log to 100MB:

start_iq -n iqdemo iqdemo.db ... <other options> ... -iqmsgsz 100

For information on the IQMsgMazSize server property, see “sa_server_option system procedure” in Chapter 7, “System Procedures” in Reference: Building Blocks, Tables, and Procedures.

For information on message log management, see “Message logging” in Chapter 1, “Overview of Sybase IQ System Administration” in the System Administration Guide: Volume 1.

-iqmt num Specifies the number of Sybase IQ threads to create. The default is 60 per CPU for the first four CPUs and 50 per CPU for the remainder, plus connection threads. For example, on a system with 12 CPUs and 10 connections, 60*4 + 50*(numCPUs - 4) + 2*(numConnections + 2) + 1 = 665. The minimum value is 2*num_conn+1. The total number of threads (-iqmt plus -gn) cannot exceed 4096 on 64-bit platforms, or 2048 on 32-bit platforms. The default -iqtss setting should be adequate to support these maximum numbers of threads.

-iqnotemp size Creates a temporary file in place of the defined temporary dbspace. size is file size in MB.

-iqnumbercpus num Specifies the number of CPUs available to IQ, overriding the physical number of CPUs for resource planning purposes. The value of -iqnumbercpus defaults to the total number of CPUs, but the range of available values is 1 – 128.

Sybase recommends that you use -iqnumbercpus only on:

Setting -iqnumbercpus higher than the number of available CPUs may affect performance.

-iqpartition Specifies the number of partitions in the IQ main and temp buffer caches. Must be a power of 2. Allowed values are: 0 (default), 1, 2, 4, 8, 16, 32, 64. By default, IQ computes the number of partitions automatically as number_of_cpus/8, rounded to the nearest power of 2, up to a maximum of 64. You may be able to improve performance by adjusting the number of cache partitions. The -iqpartition switch sets this value for an IQ server, and overrides the value set by the Cache_Partitions database option. See “CACHE_PARTITIONS option” in Chapter 2, “Database Options” in the Reference: Statements and Options, and “Managing lock contention” in Chapter 10, “Transactions and Versioning” in the System Administration Guide: Volume 1 for more information on whether you should set one of these options, and factors that affect them.

-iqsmem size Creates a memory pool (in MB) to increase heap space.

-iqstart N Provides startup diagnostics for dbspaces. The input parameter N is a number value that represents an integer bit mask. You may combine values to provide more than one feature. Output generated before the IQ message file is generated goes to the console. The -z startup switch provides additional startup and connection information.

The allowed values are as follows:

-iqtc size Specifies IQ temporary store cache size in MB. Overrides default of 8MB, or value, if any, set by TEMP_CACHE_MEMORY_MB database option. Applies to all databases started from the time the IQ server is started until the IQ server is shut down. In other words, if you start one database at server startup and another later, you need 2 * -iqtc available for the temp cache. In general, Sybase recommends that you do not run multiple databases with a Sybase IQ server.

-iqtss size Sets the stack size of the internal execution threads in the server. The default value is 200KB for 32-bit platforms, and 512KB for 64-bit platforms, which is the recommended value for each platform. However, some complex queries may return an error indicating that the depth of the stack exceeded this limit, so the DBA may need increase this value. On 32-bit platforms, the best setting depends on the available memory, number of CPUs, number of connections and type of queries run. On 64-bit platforms, the value 1000 is reasonable because the memory of 64-bit systems is not constrained as it is in 32-bit systems. Do not choose a value less than the default or you may find that some queries cannot run.

-iqwmem size Creates a pool of “wired” memory on HP and Sun UNIX systems. This memory is locked down so it cannot be paged by the operating system. Specify the memory size, in MB. Use this switch only if you have enough memory to dedicate for this purpose. Otherwise, you may cause serious performance degradation.

-k Instructs the database server to not collect Performance Monitor statistics.

-kl file Specifies the file name of the Kerberos GSS-API library (or shared object on UNIX) and enables Kerberos authenticated connections to the database server.

-kr realm Specifies the realm of the Kerberos server principal and enable Kerberos authenticated connections to the database server. Normally, the principal used by the database server for Kerberos authentication is server-name@default-realm, where default-realm is the default realm configured for the Kerberos client. Use this option if you want the server principal to use a different realm than the default realm, in which case the server principal used is server-name@server-realm.

-krb Enables Kerberos-authenticated connections to the database server.

-ksc num Specifies the maximum number of connections that the Performance Monitor can monitor. The default number of connections is two.

-ksd num Specifies the maximum number of databases that the Performance Monitor can monitor. The default number of databases is 10.

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

-m Deletes the transaction log when a checkpoint is done, either at shutdown or as a result of a checkpoint scheduled by the server. This switch lets you automatically limit the growth of the transaction log. Checkpoint frequency is still controlled by the CHECKPOINT_TIME and RECOVERY_TIME options (which also can be set in the command line).

The -m server switch is useful if you are processing high-volume transactions requiring fast response times, and the contents of the transaction log are not being relied upon for recovery or replication.

WARNING! When you select the -m server switch, there is no protection against media failure on the device that contains the database files. Additionally, do not use the -m switch with databases that are being replicated, as replication inherently relies on transaction log information. For this reason, never use the -m switch on a multiplex database.

To avoid database file fragmentation, when you use this switch place the transaction log on a separate device or partition from the database itself.

If you start the server with the -m switch, you cannot create a database.

See “The transaction log file” in Chapter 4, “Managing System Resources” in the Performance and Tuning Guide.

-n name Sets the name of the database server. By default, the database server receives the name of the database file with the path and extension removed. For example, if you start a server on the file c:\sybase\IQ-15_1\demo\iqdemo.db and do not specify the -n switch, the name of the server is iqdemo.To avoid using the default name, always specify a server name.

Each server name must be unique across the local area network (domain). This prevents you from unintentionally connecting to the wrong server. The host name and port number combination does not uniquely identify the server.

The server name is interpreted according to the character set of the machine, as no database collation exists at startup time. The server name must be a valid identifier. Long server names are truncated to 40 characters. On NetBIOS, 16 characters is the maximum length. For multiplex server names, 30 characters is the maximum.

The server name specifies the name to be used on client application connection strings or profiles.

NoteThere are two -n switches. If -n appears after a database file name, the switch is a database option. Otherwise, the switch is a server option. For example, in the following start_iq command line, the first -n indicates a server name and the second -n, which follows the database file name mydb.db, indicates a database name:

start_iq -n svrname mydb.db -n dbname

The server name must be used on the connect statement to specify the server you are connecting to. In all environments, there is always a default database server that is used if no server name is specified, provided at least one database server is running on the system.

Multiple database servers with the same name are not allowed to run on TCP/IP anywhere on the network, even on separate ports.

-o filename Prints all server message window output to a file, in addition to displaying the output on the screen. You can use this option to specify a nondefault name for the server log file, and keep using the same file after restarting the server. Be careful that you do not fill this file.

Note If the -o file is located within a file system that fills up, then the IQ server stops responding. Once this condition exists, the only way to bring down the server is to kill it.

-oe Specifies a file name to log startup errors, fatal errors, and assertions. Each line in the output log file is prefixed with the date and time.

-on size Specifies a maximum size for the database server message log, after which the file is renamed with the extension .old and a new file is started.

-os size Limits the size of the log file used by the -o switch. The default is no limit. You can specify G, K, and M units using either in lowercase or uppercase. If you do not specify units, any integer less than 10,000 is assumed to be in kilobytes, and any integer 10,000 or greater is assumed to be in bytes.

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

-p packet-size Sets the maximum size of communication packets. The range of values is 300 – 16,000 bytes and the default is 1460 bytes. See “CommBufferSize connection parameter [CBSize]” in Chapter 4, “Connection and Communication Parameters” in the System Administration Guide: Volume 1.

-pc Compresses all connections except for same-computer connections.

-pt size Increases or decreases the size limit at which packets arecompressed. -pt takes an integer value representing the minimumbyte-size of packets to be compressed. The default is 120 bytes, which should be appropriate in most situations. Sybase recommends that you do not use a value less than 80.

Under some circumstances, changing the compression threshold may improve performance of a compressed connection by allowing you to compress packets only when compression will increase the speed at which the packets are transferred.

If the client and server specify different compression threshold settings, the client setting takes precedence.

-qi (Windows servers) Controls whether the database server tray icon and window appear. If you use this option, there is no visual indication that the server is running, other than possible startup error dialogs. You can use either (or both) the -o or -oe logs to diagnose errors.

-qp Disables display of messages about performance in the database server window. Suppressed messages include:

-qs (Windows servers) Suppresses startup error dialogs. Startup errors include:

On Windows platforms, if the server is not being autostarted, these errors appear in a dialog and must be cleared before the server stops.

If there is an error loading the language DLL, no dialog appears if -qs was specified on the command line, and not in @environment-variable or @filename syntaxes. This error is logged in the Windows Application Event Log.

Usage errors are suppressed if -qs is on the command line, but not in @filename or @environment-variable expansion.

-qw Suppresses the database server window (Windows platforms) and displays messages on the console (non-Windows platforms).

-s <id> ( UNIX servers) Sets the system user ID used in messages to the syslog facility. The default is user, which uses the user ID for the database server process. A value of none prevents any syslog messages from being logged.

-sb { 0 | 1 } Specifies how the server reacts to broadcasts on TCP/IP.

-sb 0 means the server does not start up any TCP/UDP broadcast listeners. In addition to forcing clients to use the DoBroadcast=NONE and HOST= options to connect to the server, -sb 0 causes the server to be unlisted when using dblocate.

-sb 1 means the server does not respond to broadcasts from dblocate, but leaves connection logic unaffected. You can connect to the server by specifying LINKS=tcpip and ENG=<name>.

-sf feature This option allows you to enable and disable features for a database server. The feature-list is a comma-separated list of feature names or feature sets to secure for the database server.

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

-su password This option specifies the initial password for the DBA user in the utility database (utility_db). The password is case-sensitive. You can specify none for the password to disable all connections to the utility database.

-ti minutes Disconnects connections that have not submitted a request for the number of minutes you specify. The default is 4400 (72 hours), so that a user running a long query will not be logged off over a long weekend. A client machine in the middle of a database transaction holds locks until the transaction is ended or the connection is terminated. By disconnecting inactive connections, -ti frees these locks. The -ti switch does not disconnect clients that use the shared memory communications link. Using -ti has no effect on connections to a local server using shared memory. Setting the value to zero disables checking of inactive connections, so that no connections are disconnected.

You can use the IDLE connection parameter to set timeout values for individual connections. For more information, see “Idle connection parameter [IDLE]” in Chapter 4, “Connection and Communication Parameters” in the System Administration Guide: Volume 1.

-tl seconds Sets the liveness timeout period for the server. A liveness packet is sent periodically across a client/server TCP/IP communications protocol to confirm that a connection is intact. If the server runs for a liveness timeout period (default 2 minutes) without detecting a liveness packet, the communication is severed and the server drops any connections associated with that client. UNIX non threaded clients and TDS connections do not perform liveliness checking.

The -tl switch on the server sets the liveness timeout for all clients that do not specify a -tl switch.

When there are more than 200 connections, the server automatically calculates a higher LivenessTimeout value based on the stated LivenessTimeout value. This enables the server to handle a large number of connections more efficiently.

Clients send liveness packets at an interval of between one third and two thirds of the LivenessTimeout value on each idle connection. Large numbers of liveness packets are not sent at the same time. If liveness packets take a long time to send (depending on the network, the machine's hardware, and the CPU and network load on the machine), liveness packets may be sent after two thirds of the LivenessTimeout. A warning appears in the server console if the liveness sends take a long time. If this warning occurs, consider increasing the LivenessTimeout value.

-tmf Forced transaction manager recovery. Used during recovery of distributed transactions when the distributed transaction coordinator is not available.

-tq time Shuts down the server at a specified time. The format for the time is HH:MM (24-hour clock), and can be preceded by an optional date. If you do specify a date, enclose the date and time in double quotes and use the format “YYYY/MM/DD HH:MM”.

-u Opens files using the operating system disk cache, rather than opening files using the database cache only.

-ud (UNIX servers) Causes the process to run as a daemon in the root directory. Sybase recommends that you do not use this switch in IQ servers.

-uf (UNIX servers) Specifies the action to take when a fatal error occurs.

-ut min (UNIX servers) Causes the server to touch catalog store temporary files at intervals specified by min.

-v Displays the database server version in a message box (Windows) or in a version string (UNIX / Linux).

-x list Specifies server-side network communications protocols.

list is a comma-separated list of tcpip or namedpipes settings. For example:.

For example,

-x tcpip,ipx

allows only TCP/IP and IPX communications.

The default is to try all settings supported by the database server on your operating system.

For some protocols, you can provide additional parameters, in this format:

-x tcpip(PARM1=value1;PARM2=value2;...)

For UNIX, quotation marks are required if more than one parameter is supplied:

-x "tcpip(PARM1=value1;PARM2=value2;...)"

For a description of available parameters, see Chapter 4, “Connection and Communication Parameters” in the System Administration Guide: Volume 1.

-xs Specifies server-side Web services communications protocols.

-xs { all | none | web-protocols } …
web-protocols:     { [ http | https | http_fips ] parmlist },… parmlist:     ( parm=value;…)

Use the -xs option to specify the Web protocols you want to use to listen for client connection broadcasts. If you specify one or more protocols, the server attempts to listen for client requests using the specified protocol(s).

If you do not specify the -xs option, the server does not attempt to listen for Web requests.

Regardless of the settings you choose for the -xs option, the server always listens for connection broadcasts using the shared memory protocol. You can specify any of the following:

For a description of available parameters, see “Network communications parameters” in Chapter 4, “Connection and Communication Parameters”in the System Administration Guide: Volume 1.

For UNIX, you must use quotation marks if you are supplying more than one parameter:

-xs "http(PARM1=value1;PARM2=value2;...)"

This command allows only shared memory and TCP/IP communications:

start_iq web.db -xs http(port=80)

See “CommLinks connection parameter [Links]” in Chapter 4, “Connection and Communication Parameters” in the System Administration Guide: Volume 1.

-z Provides diagnostic information about communication links on startup. Use this switch only when you are troubleshooting problems.

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

-zl Enables capturing of the most recently-prepared SQL statement for each connection to a database on the server.

Alternatively, you can enable this feature using the remember_last_statement option of the sa_server_option system procedure. You can obtain the most recently-prepared SQL statement for a connection using the LastStatement property function. The sa_conn_activity stored procedure allows you to obtain the most recently-prepared SQL statement for all current connections to the database on the server.

For stored procedure calls, only the outermost procedure call appears.

-zn num Specifies the number of request log file copies to retain. Used in conjunction with -zs.

-zo file Redirects request-level logging information to a file separate from the regular log file. Request-level logging is turned on using the -zr switch. The -zo switch directs the output from this file to a separate file from that specified on a -o switch. This switch also prevents request-level logging from being displayed in the console.

-zoc file Redirects HTTP Web service client procedure debug log to a file.

-zr level Enables request-level logging of operations:

-zr also prevents request-level logging from appearing in the console. See “Logging server requests” in Chapter 14, “Troubleshooting Hints” of System Administration Guide: Volume 1. To correlate connection information in the -zr log file with that in the .iqmsg file, see “Correlating connection information,” and for information about reading the -zr log output, see “Request log file analysis,” both in Chapter 14, “Troubleshooting Hints” in the System Administration Guide: Volume 1.

See also "Request logging" in SQL Anywhere Server – SQL Usage.

See also “-zo file” and “-zs { integer | integerG | integerK | integerM } …” command-line switches.

-zs { integer | integerG | integerK | integerM } … Limits the size of the request-level logging file. Request-level logging is turned on using the -zr switch, and redirected to a separate file using the -zo switch. You can limit the size of the file using the -zs switch.

You can specify G, K, and M units using either uppercase or lowercase. If you do not specify units, any integer less than 10 000 is assumed to be in kilobytes, and any integer 10,000 or greater is assumed to be in bytes.

When the request log file reaches the size specified by either the -zs option or the sa_server_option system procedure, the file is renamed with the extension .old appended (replacing an existing file with the same name if one exists). The request-level log file is then restarted.

By default there is no limit. The value is in kilobytes.

The following example shows how the -zs option is used to control log file size. Suppose you start a database server with the following options on the command line:

-zr all -zs 10 -zo mydatabase.log

A new log file mydatabase.log is created. When this file reaches 10K in size, any existing mydatabase.old files are deleted, mydatabase.log is renamed to mydatabase.old, and a new mydatabase.log file is started. This process is repeated each time the mydatabase.log file reaches 10K.

Database options

-dh Makes a database undetectable when the Server Enumeration utility (dblocate) is run against the server.

-ds Specifies the directory where the dbspaces for the database are located. When a dbspace directory is specified, the database server only searches this directory for dbspaces.

–ec Uses Transport Layer Security or simple encryption to encrypt all native Sybase IQ packets (DBLib, ODBC, and OLE DB) transmitted to and from all clients. TDS™ (Tabular Data Stream) packets are not encrypted.

-ec encryption-options
encryption-options:
 { NONE | 
	SIMPLE | 
TLS ( TLS_TYPE=cipher;
[FIPS={Y|N};] 
IDENTITY=server-identity-filename;
IDENTITY_PASSWORD=password ) } , …

See "-ec server option" in SQL Anywhere Server – Database Administration.

see also “Encryption connection parameter [ENC]” in Chapter 4, “Connection and Communication Parameters” in the System Administration Guide: Volume 1.

-ek Provided after the file name of a strongly encrypted database. Requires the key value as an argument to start an encrypted database. The key value is a string, including mixed cases, numbers, letters, and special characters. If you have a strongly encrypted database, you must provide the encryption key to use the database or transaction log; if you do not, the command fails. For a strongly encrypted database, you must specify either -ek or -ep, but not both.

-m Truncates (deletes) the transaction log when a checkpoint is done, either at shutdown or as a result of a checkpoint scheduled by the server. This provides a way to automatically limit the growth of the transaction log. Checkpoint frequency is still controlled by the CHECKPOINT_TIME and RECOVERY_TIME options (also definable on the command line).

The -m option is useful where high volume transactions requiring fast response times are being processed, and the contents of the transaction log are not being relied upon for recovery or replication. When this option is selected, there is no protection provided against media failure on the device containing the database files.

To avoid database file fragmentation, Sybase recommends that if you use the -m option, you place the transaction log on a separate device or partition than the database itself.

This option is the same as the -m server option, but applies only to the current database or the database identified by the database-file command-line variable.

NoteDo not use the -m option with databases that are being replicated, as replication inherently relies on transaction log information. For this reason, never use the -m option on a multiplex database.

-n name Provides an alternate name, or nickname, for the database. Using a nickname simplifies connections. For Open Client, the -n nickname must be the same as the entry in the interfaces file.

Since a database server can load several databases, the database name is used to distinguish the different databases. However, Sybase strongly recommends that you run only one database on an IQ server. If you must run two databases, start two IQ database servers on different ports.

By default, the database receives as a name the file name with the path and extension removed. For example, you start a server on c:\sybase\IQ-15_1\demo\iqdemo.db and do not specify the -n option, then the name of the database is iqdemo. To avoid using the default name, always specify a server name.

For naming conventions, see the -n server option.

NoteThere are two -n switches. If -n does not follow a database file name, the option names the server. If -n appears after a database file name, the switch is a database switch.

-sm Provides an alternate database server name that can be used to access the read-only mirror database. The alternate-server-name is only active when the database server is acting as mirror for the database. By using the -sm and -sn command-line options, an application can always connect to the database on the primary or the mirror server, without knowing which physical server is acting as primary or mirror.

-sn Provides an alternate server name for a single database running on adatabase server. The database server can be configured to listen for more thanone server name for a particular database server. Server names other than thereal server name are called alternate server names, and are specific to aparticular database running on the database server. Clients using the alternateserver name to connect can only connect to the database that specified thealternate server name. Alternate server names must be unique on the network;otherwise, the database fails to start. If the database is started in the servercommand and the alternate server name is not unique, the server fails to start.

-r Forces all databases that start on the database server to be read-only. No changes to the database are allowed: the database server doesn't modify the database file.

Recovery options

-iqfrec dbname Marks the specified database as in use and restores the IQ portion of the database to its last known consistent state. Do not use -iqfrec during normal operations; use it only while force-recovering a database. The dbname must be the physical database name, not a logical name or nickname.

NoteThe option -iqfrec applies only to the IQ part of the database, not to the catalog store. -iqfrec does not enable a forced recovery on the SQL Anywhere part of the database (the catalog store).

Follow correct procedures when using -iqfrec. See Chapter 13, “System Recovery and Database Repair” in the System Administration Guide: Volume 1.

See also

Chapter 2, “Running Sybase IQ” in the System Administration Guide: Volume 1