Starting the database server

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

The UNIX versions of Sybase IQ provide the script start_asiq and the Windows version of IQ provides start_asiq.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). start_asiq also includes some parameters and calculates others. For more information about switches specific to your operating system, see the Sybase IQ 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. For details, see Chapter 2, “Running Sybase IQ” in the Sybase IQ System Administration Guide.

Syntax

start_asiq -n server-name
[ server-switches ] [ database-file [ database-switches ] ]

Parameters

The following tables list the available switches for the start_asiq server-switches and database-switches parameters.

You can list the start_asiq switches using the command

start_asiq -?

Server switches

Table 1-1: start_asiq server-switches

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 sizing

-cc {+|-}

Enable/disable page collection for cache warming

-ch size

Set Catalog Store cache size upper limit

-cl size

Set the cache size lower limit

-cr {+|-}

Enable/disable cache warming

-cs

Display cache sizing statistics

-ct { + | - }

Enable/disable character set translation (enabled by default)

-cv {+|-}

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

-ec encryption-options

Enable packet encryption [network server].

-ek key-spec

Starts an encrypted database, when key value is provided as an argument.

-ep

(Windows) 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.

-f

Force database to start without transaction log

-ga

Automatically unload database after last connection closed

-gb level

Set database process priority class to level [Windows]

-gc num

Set checkpoint timeout period to num minutes

-gd level

Set the permission required to start and stop the database

-ge size

Sets the stack size for threads that run external functions [Windows]

-gf

Disable firing of triggers

-gk level

Set the permission required to stop the server

-gl level

Set the permission required to load data

-gm level

Limit the number of connections to the server that can be active 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. The default is 10 connections.

-gn integer

Set the number of execution threads that will be used for the Catalog Store and connectivity while running with multiple users.

-gp size

Set maximum page size to size bytes

-gr num

Set maximum recovery time to num minutes

-gu level

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

-h or -?

Display usage information; show a list of all options

-iqgovern num

Specify the number of concurrent queries

-iqlocalreplay { all | none | [ grants | procedures | views ] ...}

Specify what gets recreated during TLV log replay from the local store after IQ server synchronization. The default is -iqlocalreplay all.

-iqmc size

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

-iqmt num

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

-iqmpx_ov 1

For use starting multiplex databases only. Starts the server with override to acknowledge that the write server is starting (1) on a different host, (2) with a different server name, or (3) using a different path to its catalog (.db) file. Do not start two write servers against the same database.

-iqmpx_sn 1

For use starting multiplex databases only. Starts the write server in single-node operating mode, for certain types of recovery.

-iqnolocalreplay 1

Do not replay the TLV log after synchronizing a multiplex.

-iqnomain 1

Start a query server with a local store without opening shared IQ Main Store.

-iqnotemp size

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

-iqnumbercpus

Override the number of physical CPUs with the number available to IQ

-iqpartition

Specify number of partitions in main and temp buffer caches

-iqro

Opens the IQ Main Store or IQ Local Store in read-only mode, regardless of the status of dbspaces in the main or local store.

-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

-m

Truncate transaction log after checkpoint

-n name

Use name as the name of the database server

NoteThere are two -n options.The -n option is positional. If this option appears after a database file name, the meaning is different. See“Database switches”.

-o filename

Output server messages to the specified file

-oe filename

Set filename to log startup errors, fatal errors, and assertions

-os

Specify maximum size of file for server messages

-p packet-size

Set maximum network packet size

-qi

Control whether database server tray icon and window appear [Windows]

-qp

Do not display messages about performance in the database server window

-qs

Suppress startup error dialogs [Windows]

-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

-startdir dirname

Start the server in the specified directory. If you use this parameter on Windows, IQ assumes that each server is being started by the Sybase IQ Agent, and starts the server in the background

-ti min

Client idle time before shutdown:—default 4400 minutes

-tl sec

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

-tq time

Set quitting time

-ud

Run as a daemon [UNIX] (not recommended; not used with start_asiq)

-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

-zl

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

-zo

Specify file for logging server requests

-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_asiq 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:

Database switches

Table 1-2: start_asiq database-switches

Switch

Description

-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, this switch is a server switch.

Multiplex options

Sybase recommends that you start and stop multiplex databases using the Sybase Central interface. If you cannot run Sybase Central, or if you need to start multiplex databases from a script, use the startup commands described in this section instead.

Startup or shutdown operations require multiple commands:

You can specify the following multiplex switches on the start_asiq command line for managing multiplex databases.

NoteIf used improperly, these switches can cause problems. Make sure you read the following descriptions carefully before using the multiplex startup switches.

Table 1-3: start_asiq multiplex switches

Switch

Description

-iqmpx_ov 1

For use starting multiplex databases only. Starts the server with override to acknowledge that the write server is starting (1) on a different host, (2) with a different server name, or (3) using a different path to its catalog (.db) file. Do not start two write servers against the same database.

-iqmpx_sn 1

For use starting multiplex databases only. Starts the write server in single-node operating mode, for certain types of recovery. Query server(s) cannot run while the write server is in single-node mode.

For help on dbremote options, type:

dbremote -h

Table 1-4 lists the dbremote switches that are recommended when running IQ multiplex servers.

Table 1-4: Recommended dbremote switches for multiplex servers

Switch

Description

-o output_filename

Specifies an output file

-q

Runs minimized

-v

Specifies verbose output

Sybase provides shell scripts in the write server database directory to start dbremote for each server in the multiplex. There is currently no service mechanism to start these processes automatically; this is up to the user. For example, on a Windows system, a DBA may add an entry in the Windows registry so that these processes start as soon as the DBA logs into the system. Note that dbremote is only required for data replication and servers run without it are still viable. Old data versions will not be recovered at the write server when dbremote is running.

Multiplex startup example

The following example starts the multiplex server Server02. If this server was configured to be a query server, it will come up as a query server automatically.

start_asiq @params.cfg -n Server02 
-x "tcpip(port=1234)" mpxdb.db

Then, on the write server’s host:

dbremote -c "uid=DBA;pwd=SQL;eng=Server02;links=tcpip{host=ciaran;port=1234};dbf=mpxdb"
-v -o outfile.out

For more examples of startup and dbremote commands, generate the administrative scripts as described in Sybase IQ System Administration Guide. Use a text editor to view the commands in the scripts.

Always run dbremote on the write server’s host, whether you are starting a query server or the write server. You can customize the administrative scripts to run dbremote. For more information, see “Using administrative shell scripts” in Chapter 5, “Working with Database Objects” of the Sybase IQ System Administration Guide.

On Windows systems, a SQL Remote screen will appear. You can minimize this screen.

Recovery switches

The start_asiq recovery-options are a subset of the database-switches that are used only for database recovery operations.

Table 1-5: start_asiq recovery-switches

Switch

Description

-iqdroplks dbname

Allow the sp_iqcheckdb stored procedure to recover leaked storage within the specified database.

-iqfrec dbname

Mark the specified database as in use and restore database to its last known consistent state.

Usage

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

database-file Specifies the database filename. 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 myserver that allows 15 connections, sets the maximum Catalog page size to 4MB, and loads the sample database:

-gm 15
-gp 4096
-n myserver
c:\sybase\ASIQ-12_7\demo\asiqdemo.db

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

start_asiq @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\ASIQ-12_7\demo\asiqdemo.db start_asiq @envvar

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. The cache size may also be specified as nK or nM or nP (1M = 1024 KB).

The default value of -c in the default.cfg file and start_asiq 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.

The unit P is a percentage of the physical system memory. 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, you would specify:

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

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 still increases if the database server would otherwise run into the error

Fatal Error: dynamic memory exhausted 

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

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

-ct { + | - } By default, character set translation is turned on. Character set translation converts strings between character sets that represent the same characters, but at different values. This is useful when the client machine and the database use different character sets. To disable character set translation, specify -ct-. To enable character set translation, specify -ct+.

Prior to version 12.6, the + or - values were not accepted: specifying the -ct option enabled character set translation.

For more information, see Chapter 11, “International Languages and Character Sets” of the Sybase IQ System Administration Guide.

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

4 Gb

Windows 2000 Server

1.8 Gb*

4 Gb

Windows 2000 Advanced Server

2.7 Gb*

8 Gb

Windows 2000 Datacenter Server

2.7 Gb*

64 Gb

Windows XP Home Edition

1.8 Gb

2 Gb

Windows XP Professional

1.8 Gb

4 Gb

Windows Server 2003, Web Edition

1.8 Gb

2 Gb

Windows Server 2003, Standard Edition

1.8 Gb

4 Gb

Windows Server 2003, Enterprise Edition

2.7 Gb*

32 Gb

Windows Server 2003, Datacenter Edition

2.7 Gb*

64 Gb

*You must boot 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, this is recommended 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 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, you must do the following:

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 4 KB and dynamic cache sizing is disabled.

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

–ec Using transport-layer security or simple encryption, encrypts all native Sybase IQ packets (DBLib, ODBC, and OLE DB) transmitted to and from all clients. TDS packets are not encrypted.

-ec encryption-options
encryption-options:
 { NONE | SIMPLE | ECC_TLS (CERTIFICATE=filename; CERTIFICATE_PASSWORD=password )   
| RSA_TLS (CERTIFICATE=filename; CERTIFICATE_PASSWORD=password )
| RSA_TLS_FIPS (CERTIFICATE=filename;
CERTIFICATE_PASSWORD=password ) 
| ALL } , …

The -ec option instructs the database server to accept only connections from ODBC, OLE DB, or embedded SQL interfaces that are encrypted using one of the specified types. Connections over the TDS protocol, which include Java applications using jConnect, are always accepted regardless of encryption.

By default, communication packets are not encrypted, which poses a potential security risk. If you are concerned about the security of network packets, use the -ec option. Encryption affects performance only marginally. The -ec option controls the server's encryption settings and requires one or more of the following parameters in a comma-separated list:

The dbtls9.dll and dbrsa9.dll files contain the Certicom and RSA code used for encryption and decryption. When you connect to the server, if the appropriate file cannot be found, or if an error occurs, a message appears on the server console in debug mode. The server does not start if the types of encryption specified cannot be initiated.

The client's and the server's encryption settings must match or the connection will fail. If -ec simple is specified and -ec none is not, connections that do not request encryption can connect and automatically use simple encryption.

The following shows starts the server with the elliptic-curve server certificate sample.crt:

start_asiq -ec ecc_tls(certificate=sample.crt; certificate_password=tJ1#m6+W) -x tcpip asiqdemo.db

The following starts the server with the RSA server certificate rsaserver.crt:

start_asiq -ec rsa_tls(certificate=rsaserver.crt; certificate_password=test) -x tcpip asiqdemo.db

The following starts the server with the RSA server certificate rsaserver.crt. The rsa_tls_fips parameter specifies the FIPS-approved RSA algorithm:

start_asiq -ec rsa_tls_fips(certificate=rsaserver.crt; certificate_password=test) -x tcpip asiqdemo.db

For more information, see “Encryption connection parameter [ENC]” in Sybase IQ System Administration Guide.

-ek Provided after the filename 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 in any way. For a strongly encrypted database, you must specify either -ek or -ep, but not both. If you do not specify a key for a strongly encrypted database, the command will fail.

-ep (Windows) 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 will fail if you do not specify a key for a strongly encrypted database.

The engine must either not be a Windows service, or 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, you can click Cancel to continue when the dialog box prompt appears.

-ga Specifying this switch on the network server causes each database to be unloaded after the last connection to the database is dropped. The database server itself does not shut down.

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

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

Both uppercase and lowercase syntax are acceptable.

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

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

Both uppercase and lowercase syntax are acceptable.

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

The allowed values are as follows:

Both uppercase and lowercase syntax are acceptable.

The default settings are all for servers started with start_asiq and dba for other servers. Sybase recommends that you use the setting all on all systems for consistency with earlier versions. The all setting is used in the asiqdemo.cfg and default.cfg configuration files. For more about these configuration files, see Table 2-1 in Chapter 2, “Running Sybase IQ” of the Sybase IQ System Administration Guide.

-gm num Limits the number of connections to the server that can be active at one time. If this number is greater than the number that is allowed under licensing and memory constraints, this switch has no effect. The default varies by machine capacity, but 15 is recommended. The value should approximate the number of users expected to connect to the server.

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 you need to specify this parameter in the start_asiq command. To calculate its value use the following formula:

gn_value = gm_value + 5

Specify a minimum of 25. The total number of threads (-iqmt plus -gn) must not exceed a platform-specific maximum; see “-iqmt num” for details.

The start_asiq utility sets this parameter. See the Sybase IQ 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 4096.

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

For more information, see “RECOVERY_TIME option” in Chapter 2, “Database Options” in the Sybase IQ Reference Manual.

-gu level Sets permission levels for commands such as CREATE DATABASE and DROP DATABASE. The level can be set to one of following: 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, you must specify utility_db as the database name (that is, there is no database file) and the utility database password (stored in the file util_db.ini) must be known.

-h Displays usage information. Sybase IQ also displays usage information if you specify any non-valid switch, such as -help.

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

-iqlocalreplay { all | none | [ grants | procedures | views | userandpwd ] ... } Specifies what is reconstituted on the query server during TLV log replay from a Local IQ Store after query server synchronization. IQ tables and user-defined data types must always be enabled for replay.

The allowed values are as follows:

By default, the log replays actions as follows:

For example,

-iqlocalreplay "all" 

This example replays all DDL commands from the local TLV log if the server was just synchronized.

-iqmc size Specifies main IQ Store cache size in MB. Overrides default of 16MB, or value, if any, set by 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 does not recommend running multiple databases with a Sybase IQ server.

-iqmpx_ov 1 For use starting multiplex databases only. Starts the server with override to acknowledge that the write server is starting (1) on a different host, (2) with a different server name, or (3) using a different path to its catalog (.db) file. Do not start two write servers against the same database. For details about using this parameter, see “Multiplex options”

-iqmpx_sn 1 Use only with a multiplex database. Starts the write server in single-node operating mode for certain types of recovery. Do not use to start query servers.

-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) must not 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.

-iqnolocalreplay Use only with a multiplex database. Do not replay the TLV log after synchronizing a multiplex.

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

Sybase recommends using -iqnumbercpus only in the following situations:

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. To set the number of partitions for a particular database, use the Cache_Partitions database option. See “CACHE_PARTITIONS option” in Chapter 2, “Database Options” of the Sybase IQ Reference Manual, and “Managing lock contention” in Chapter 10, “Transactions and Versioning” of the Sybase IQ System Administration Guide for more information on whether you should set one of these options, and factors that affect them.

-iqro dbspace-name Opens the IQ Main Store or the IQ Local Store in read-only mode, regardless of the status of the dbspaces in the main or local store.

-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 does not recommend running 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. However, some very 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. You specify the size in MB of memory. Use this switch only if you have enough memory to dedicate for this purpose. Otherwise, you can cause serious performance degradation.

-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 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 (which also can be set in the command line).

The -m server switch 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.

WARNING! When you select the -m server switch, there is no protection against media failure on the device that contains the database files.

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.

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

For information on truncating the transaction log file using the-m switch, see “The transaction log file” in Chapter 5, “Managing System Resources” of the Sybase IQ 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 the server is started on the file c:\sybase\ASIQ-12_7\demo\asiqdemo.db and no -n switch is specified, then the name of the server is asiqdemo. You should, however, change the default 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.The -n switch is positional. If this switch 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_asiq 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_asiq -n svrname mydb.db -n dbname

The server name must be used on the connect statement to specify to which server you wish to connect. In all environments, there is always a default database server that will be used if no server name is specified provided at least one database server is running on the system. Always specify a server name to avoid using the default 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.

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 will hang. Once this condition exists, the only way to bring down the server is to kill it. To prevent this problem from occurring, specify the -os switch.

-os size Limits the size of the log file used by the -o switch. The default is no limit. The units G, K, and M can be either lower case or upper case. If G, K, or M is not supplied, 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.

-p packet-size Sets the maximum size of communication packets. The default is 1460 bytes. The minimum value is 300 bytes and the maximum value is 16000 bytes. To set this value for a connection, see “CommBufferSize connection parameter [CBSize]” in the Sybase IQ System Administration Guide.

-qi On Windows servers, controls whether database server tray icon and window appear. This option leaves 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. Messages that are suppressed include the following:

Specifies no server screen display (no console for the server).

-qs On Windows servers, suppresses startup error dialogs. Startup errors include errors such as:

On Windows platforms, if the server is not being autostarted, these errors appear in a dialog and must be cleared before the server stops. These dialogs do not appear if the -qs option is used.

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 not logged to the -o or -oe logs, but rather to 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 For 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.

Using -sb 0 causes the server not to 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, this option causes the server to be unlisted when using dblocate.

Using -sb 1 causes the server to not respond to broadcasts from dblocate, while leaving connection logic unaffected. You can connect to the server by specifying LINKS=tcpip and ENG=<name>.

-ti minutes Disconnects connections that have not submitted a request for minutes minutes. The default is 4400 (72 hours), so that a user with 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. The -ti switch is provided to disconnect inactive connections, freeing their locks. The -ti switch does not disconnect clients that use the shared memory communications link. Setting the value to zero disables checking of inactive connections, so that no connections are disconnected.

You can set the connection timeout for individual connections using the IDLE connection parameter. For more information, see “Idle connection parameter [IDLE]” in Sybase IQ System Administration Guide.

-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. The server drops any connections associated with that client. UNIX non-threaded clients and TDS connections do not do 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 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), it is possible that liveness packets will 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.

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

-ud For UNIX servers, causes the process to run as a daemon in the root directory. (Not recommended for IQ.)

-ut min For 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, and then stops.

-x list Specifies server side network communications protocols.

The list is a comma-separated list of settings taken from the following list: TCPIP, or NamedPipes.

For example,

-x tcpip,ipx

allows only TCP/IP and IPX communications.

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

For some protocols, additional parameters may be provided, in the 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 Sybase IQ System Administration Guide.

-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 which web protocols you want to use to listen for client connection broadcasts.

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

If you specify the -xs option with one or more protocols, the server attempts to listen for client requests using the specified protocol(s).

Regardless of which 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”of the Sybase IQ System Administration Guide.

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

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

The following server command line allows only shared memory and TCP/IP communications:

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

For more information, see “CommLinks connection parameter [Links]” in Sybase IQ System Administration Guide.

-z Provides diagnostic information on communications links on startup. This should only be used when tracking problems.

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

This feature can also be turned on using the remember_last_statement server setting. 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, not the statements within the procedure.

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

-zr level Enables request-level logging of operations:

This switch also prevents request-level logging from being displayed in the console.To correlate connection information in the -zr log file with that in the .iqmsg file, see “Correlating connection information” in Chapter 1, “Troubleshooting Hints” of the Sybase IQ Troubleshooting and Recovery Guide.

See also “-zo” 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.

The units G, K, and M can be either lower case or upper case. If G, K, or M is not supplied, 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 the specified size (in this case 10K).

Database options

-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, it is recommended that where this option is used, the transaction log be placed on a separate device or partition from 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 a nickname, an alternate name for the database. Using the -n nickname simplifies connections. For Open Client the -n nickname must be the same as the entry in the interfaces file.

Both database servers and databases can be named. 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, if the server is started on c:\sybase\ASIQ-12_7\demo\asiqdemo.db and no -n option is specified, then the name of the database is asiqdemo.

For naming conventions, see -n server option.

NoteThe -n option is positional. After a database file name, this option names the database. If the option does not follow a database file name, the option names the server.

Recovery options

-iqdroplks name Allows the sp_iqcheckdb stored procedure to recover leaked storage within the IQ portion of the specified database. Use this option only while recovering leaked storage. Do not use this option during normal operations. The dbname must be the physical database name, not a logical name or nickname.

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

NoteThe options -iqfrec and -iqdroplks apply only to the IQ part of the database, not to the Catalog Store. -iqfrec does not enable a forced recovery on the Adaptive Server Anywhere part of the database (the Catalog Store).

Be sure to follow correct procedures when using -iqfrec and -iqdroplks. See the Sybase IQ Troubleshooting and Recovery Guide for details.

See also

Chapter 2, “Running Sybase IQ” in Sybase IQ System Administration Guide