Interactive SQL Utility Syntax

Invoke Interactive SQL from a command prompt.

dbisql [ options ] [ dbisql-command | command-file ]
Note: Interactive SQL does not accept @filename parameters. Exit codes are 0 (success) or non-zero (failure).

Example 1

  • The following command, entered at a system prompt, runs the command file mycom.sql against the current default server, using the user ID DBA and the password sql. If there is an error in the command file, the process terminates.

dbisql -c "uid=DBA;pwd=sql" -onerror exit mycom.sql

Example 2

  • The following command, when entered on a single line at a command prompt, adds a user to the current default database:

dbisql -c "uid=DBA;pwd=sql" grant connect to joe identified by passwd
Related reference
Interactive SQL Command Line Options