Background documentationOverview of All SQLCLI Call Options Locate this document in the navigation structure


You can call the SQLCLI program with options:

sqlcli [<options>]

Call Options: Database Session



-d <database_name>

Database name


Encrypted data transmission

-n <database_computer>[:<port>]

Name of the computer on which the database is installed and port of the installation-specific X server

See Global Listener and X Servers


Enforces execution of SQL statements as statements rather than as prepared statements

-S <sql_mode>

SQL mode

-u <database_user,database_user_password>

User name and password for logging on to the database

-U <user_key>

Log on using user key

-y <timeout>

Timeout value (in seconds) for the database session

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


Switches AUTOCOMMIT mode off

Call Options: Input and Output



-c <separator>

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

The default value is //.

-i <file>

Imports commands from the batch file <file>


Displays results consecutively (not page by page)


Activates multiple line mode for entering SQLCLI commands

-o <file>

Writes the results to the <file>


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

Call Options: Formatting the Output




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


Suppresses the output of the column names in the result set

-b <maximum_length>

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

Default value: 10 characters


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

-F <separator>

Specifies which string SQLCLI uses as a separator between the individual 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: |


Outputs each column of the result set in a new row

Call Options: Other



-E <exit_code>

If an error occurs, SQLCLI terminates automatically and returns the error message <exit_code>.


Displays the help


Outputs debug information

-T <file>

Activates the SQLDBC trace

SQLDBC writes the trace data to the <file>


Displays version information about the SQLCLI program