Executes SQL commands against a database.
dbisqlc [ options ] [ dbisqlc-command | command-file ]
Scan commands but do not execute them. This is useful for checking long command files for syntax errors.
For detailed descriptions of SQL statements and Interactive SQL commands, see SQL Language Elements.
Option | Description |
---|---|
-c "keyword=value; ..." |
Specify connection parameters. If Interactive SQL cannot connect, you are presented with a dialog where you can enter the connection parameters. See Connection parameters. |
-d delimiter |
Specify a command delimiter. Quotation marks around the delimiter are optional, but are required when the command shell itself interprets the delimiter in some special way. The specified command delimiter is used for all connections in the current dbisqlc session. |
-q |
Do not display output messages. This is useful only if you start Interactive SQL with a command or command file. Specifying this option does not suppress error messages, but it does suppress the following:
|
-x |
Scan commands but do not execute them. This is useful for checking long command files for syntax errors. For detailed descriptions of SQL statements and Interactive SQL commands, see SQL Language Elements. |
NoteIt is recommended that you use the Interactive SQL utility (accessed by using the dbisql command or by choosing Start > Programs > SQL Anywhere 10 > Interactive SQL) where possible because the dbisqlc utility does not support all the features that Interactive SQL does, and it does not support all of the features available in SQL Anywhere 8, 9, and 10 databases and database servers. |
The dbisqlc utility allows you to type SQL commands or run command files.
The dbisqlc utility is supported on Windows, NetWare, Mac OS X, and Unix.
If dbisqlc-command is specified, dbisqlc executes the command. You can also specify a command file name. If no dbisqlc-command or command-file argument is specified, dbisqlc enters interactive mode, where you can type a command into a command window.
Exit codes are 0 (success) or non-zero (failure). Non-zero exit codes are set only when you run Interactive SQL in batch mode (with a command line that contains a SQL statement or the name of a script file). See Software component exit codes.
The following command, entered at a command 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.
dbisqlc -c "UID=DBA;PWD=sql" mycom.sql
The following command, when entered on a single line at a command prompt, adds a user to the current default database:
dbisqlc -c "UID=DBA;PWD=sql" GRANT CONNECT TO joe IDENTIFIED passwd