Reference Manual
CHAPTER 4. Database Administration Utilities
dbisql [ switches ] [ dbisql-command | command-file ]
dbisqlw [ switches ] [ dbisql-command | command-file ]
Switch |
Description |
---|---|
-c "keyword=value; ..." |
Supply database connection parameters |
-d delimiter |
Specify command delimiter |
-q |
Quiet mode—no windows or messages |
-x |
Syntax check only—no commands executed |
Interactive SQL provides the user with an interactive environment for database browsing and for sending SQL statements to the database server.
Interactive SQL allows you to type SQL commands, or run command files. It also provides feedback about the number of rows affected, the time required for each command, the execution plan of queries, and any error messages.
If dbisql-command is specified, Interactive SQL executes the command. You can also specify a command file name. If no dbisql-command is specified, SQL enters interactive mode, where you can type a command into a command window.
The Windows 3.x executable name is dbisqlw. You can set up Program Manager icons to start dbisqlw with the same command line syntax as specified above.
-c "keyword=value; ..." Specify connection parameters. See Connection parameters for a description of the connection parameters. If this option is not specified, the environment variable SQLCONNECT is used. If required connection parameters are not specified, you are presented with a dialog where you can enter the connection parameters.
-d Specify a command delimiter. By default, the delimiter is the semi-colon.
-q Operate quietly. Interactive SQL does not display any information on the screen. This is useful only if you start Interactive SQL with a command or command file.
-x Scan commands but do not execute them. This is useful for checking long command files for syntax errors.
For or detailed descriptions of SQL statements and Interactive SQL commands, see SQL Language Elements.
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.
dbisql -c "uid=dba;pwd=sql" mycom.sql
The following command, entered at a system prompt, adds a user to the current default database:
dbisql -c "uid=dba;pwd=sql" grant connect to joe identified by passwd
You can start Interactive SQL from Sybase Central in the following ways:
Right-click a database, and select Open Interactive SQL from the popup menu.
Right-click a table, and select View Data from the popup menu. Interactive SQL opens with the data in the table displayed in the Data window.
Right-click a stored procedure, and select Test from the popup menu. Interactive SQL opens with a test script in the Command window.