Overview of the Call Options

You can call the SQLCLI program with options:

sqlcli [<options>]

Database session

Call Option

Description

-d <database_name>

Name of database instance

-e

Encrypted data transmission

-n <database_computer>[:<port>]

Name of the computer on which the database instance is installed

If you do not use the standard port of the X Server, enter your port here. See X Server, Ports and Protocols of the X Server

-r

Forces the execution of SQL statements as statements rather than as prepared statements

-S <SQLMODE> 

SQL Mode

-u <database_user,database_user_password>

User name and password for logging on to the database instance

-U <user_key>

To log on using user keys

-y <timeout>

Timeout value (in seconds) for the database session

If you do not specify this option, the SQLCLI uses the default value of the database instance.

-z

Switches AUTOCOMMIT mode off

Input and Output

Call Option

Description

-c <separator>

When importing commands from a file, the SQLCLI uses the <separator> to separate the individual commands.

The default value is //

-i <file>

Imports commands from the batch file <file>

-j

Results are displayed successively (not page by page)

-m

Activates multiple row mode for entering SQLCLI commands

-o <file>

Writes the results to the file <file>

-x

Suppresses additional output such as the number of selected rows in a result set

Formatting Output

Call Option

Description

-A

Returns the result set unformatted (without being filled with spaces)

SQLCLI separates columns with commas and rows with line breaks. This output format is particularly suitable for generating comma-separated files (.csf).

-a

Suppresses the output of the column names in the result set

-b <MAXLENGTH>

Defines the maximum number of characters for the output of LONG values.

Default value: 10 characters

-f

SQLCLI returns all SQL statements before sending them to the database instance.

-F <separator>

Specifies which string SQLCLI uses as a separator between the columns of the result set

Default value:|

-g <null_value>

Specifies the character for null values in the result set

Default value: ?

-p <prefix>

Specifies which string is to be output before each row of the result set

Default value:|

-P <suffix>

Specifies which string is to be output after each row of the result set

Default value:|

-Q

Outputs each column of the result set in a new row

Miscellaneous

Call Option

Description

-E <exit_code>

If an error occurs, SQLCLI ends itself and returns the error message <exit_code>.

-h

Displays the help

-t

Outputs debug information

-T <file>

Activates the SQLDBC trace

SQLDBC writes the trace data to the file <file>  

-v

Displays version information about the SQLCLI program