skip to main content
Configuring the ODBC Client : Using Interactive SQL for ODBC : Interactive SQL Command-line Syntax
 

Interactive SQL Command-line Syntax

ODBCISQL supports the following command line syntax:

odbcisql [-c cmdfile] ] [-n ncmdfile] [-v] [-e] [-h] [-b count]
[-q] [-t] -f] [-p codepage]
The following table describes the command line options for ODBCISQL.
Table 22. ODBCISQL Command Line Options
Option
Description
Example

-b count
Enables benchmark mode, in which printing of query results is turned off. The number of rows fetched is printed after the specified number of records has been read. Use this option to time the execution of large queries without waiting for the results to be printed.

-b 1000

-c cmdfile
Executes the commands in the cmdfile. The cmdfile can contain multiple commands. See Commands for Interactive SQL (ODBC) for commands you can use.

-c test.sql

-e
Echoes the command being executed to the standard out. Use this option when ODBCISQL is set up to run automated test scripts so that the output file contains the command being executed.

-e

-f
Enables full hex printing of Unicode data.

-f

-h
Displays command line usage.
-h

-m count
Specifies the maximum rows to be displayed. The default value is 100. When set to 0, there is no limit on the number of rows.

-m 1000

-n cmdfile
Executes the commands in the cmdfile. The cmdfile contains Unicode commands and must be in UTF-8 format.

-n utest.sql

-p
Sets the code page for windows console. Applicable only to the Windows 32-bit platform.

-p Codepage

-q
Enables quiet mode. Output such as the start up message and time to complete the operation is not sent to the standard output.

-q

-t
Enables test mode. Error messages are sent to stdout. Some informational messages are suppressed. For timestamp fields, fractional seconds are not reported.

-t

-v
Specifies print version information.

-v