Interactive SQL parser to Adaptive Server.
isql [-b] [-e] [-F] [-n] [-p] [-v] [-X] [-Y] [-a display_charset] [-A size] [-c cmdend] [-D database] [-h headers] [-H hostname] [-i inputfilename] [-I interfaces_file] [-J client_charset] [-K keytab_file] [-l login_timeout] [-m errorlevel] [-o outputfilename] [-P password] [-Q option]| [-R remote_server_principal] [-s colseparator] [-S server] [-t timeout] [-U username] [-V [security_options]] [-w columnwidth] [-z language] [-Z security_mechanism]
Allows you to run isql from a terminal where the character set differs from that of the machine on which isql is running. -a in conjunction with -J specifies the character set translation file (.xlt file) required for the conversion. Use -a without -J only if the client character set is the same as the default character set.
Specifies the network packet size to use for this isql session, for example:
isql -A 2048
sets the packet size to 2048 bytes for this isql session. To check, type:
select * from sysprocesses
The value is displayed under the network_pktsz heading.
size must be between the values of the default network packet size and maximum network packet size configuration variables, and must be a multiple of 512.
Use larger-than-default packet sizes to perform I/O-intensive operations, such as readtext or writetext operations.
Setting or changing Adaptive Server’s packet size does not affect remote procedure calls’ packet size.
-b – disables the display of the table headers output.
Resets the command terminator. By default, terminate commands and send them to Adaptive Server by typing “go” on a line by itself. When you reset the command terminator, do not use SQL reserved words or control characters. Make sure to escape shell meta characters, such as ? ( ) [ ] $ and so on.
Selects a database that the isql session begins in.
Echoes input.
Specifies an editor other than your default editor.
Enables the FIPS flagger. With this option, the Adaptive Server flags any nonstandard SQL commands sent.
Specifies the number of rows to print between column headings. The default prints headings only once for each set of query results.
Sets the client host name.
Specifies the name of an operating system file to use for input to isql. The file must contain command terminators (“go” by default).
Specifies the name and location of the interfaces file to search when connecting to Adaptive Server. If you do not specify -I, isql looks for an interfaces file (sql.ini for Windows platforms) located in the ini directory that is below the directory specified by the SYBASE environment variable.
specifies the character set to use on the client. -J client_charset requests that Adaptive Server convert to and from client_charset, the character set used on the client. A filter converts input between client_charset and the Adaptive Server character set.
-J with no argument sets character set conversion to NULL. No conversion takes place. Use this if the client and server use the same character set.
Omitting -J sets the character set to a default for the platform. The default may not necessarily be the character set that the client is using.
Can be used only with DCE security. It specifies a DCE keytab file that contains the security key for the user name specified with -U option. Keytab files can be created with the DCE dcecp utility. See your DCE documentation for more information.
If the -K option is not supplied, the user of isql must be logged in to DCE with the same username as specified with the -U option.
Specifies the maximum timeout value allowed when connecting to Adaptive Server.
Customizes the error message display. For errors of the severity level specified or higher only the message number, state, and error level display; no error text appears. For error levels lower than the specified level, nothing appears.
Removes numbering and the prompt symbol (>) from input lines.
Specifies the name of an operating system file to store the output from isql.
Prints performance statistics.
Specifies your current Adaptive Server password. This option is ignored if -V is used. Passwords are case sensitive and can be from 6 to 30 characters in length.
Allows HA Failover.
Specifies the principal name for the server. By default, a server’s principal name matches the server’s network name (which is specified with the -S option or the DSQUERY environment variable). The -R option must be used when the server’s principal name and network name are not the same.
Resets the column separator character, which is blank by default. To use characters that have special meaning to the operating system (for example, |, ;, &, <, >), enclose them in quotes or precede them with a backslash.
Specifies the name of the Adaptive Server to connect to. Without -S, isql looks for the server specified by your DSQUERY environment variable.
Specifies the number of seconds before a command times out. If you do not specify a timeout, a command runs indefinitely. This affects commands issued from within isql, not the connection time. The default timeout for logging into isql is 60 seconds.
Specifies a login name. Logins are case sensitive.
Specifies network-based user authentication. With this option, the user must log in to the network’s security system before running the utility. In this case, users must supply their network user name with the -U option; any password supplied with the -P option is ignored.
-V can be followed by a security_options string of key-letter options to enable additional security services. These key letters are:
c – Enable data confidentiality service
i – Enable data integrity service
m – Enable mutual authentication for connection establishment
o – Enable data origin stamping service
q – Enable out-of-sequence detection
r – Enable data replay detection
Prints the version and copyright message of the isql software that you are using.
Sets the screen width for output. The default is 80 characters. When an output line reaches its maximum screen width, it breaks into multiple lines.
Initiates the login connection to the server with client-side password encryption. isql (the client) specifies to the server that password encryption is desired. The server sends back an encryption key, which isql uses to encrypt your password, and the server uses the key to authenticate your password when it arrives.
Tells the Adaptive Server to use chain transactions.
The official name of an alternate language to display isql prompts and messages. Without -z, isql uses the server’s default language. Add languages to an Adaptive Server at installation, or afterwards with the utility langinstall or the stored procedure sp_addlanguage.
Specifies the name of a security mechanism to use on the connection.
Security mechanism names are defined in the libtcl.cfg configuration file located in the ini subdirectory below the Sybase installation directory. If no security_mechanism name is supplied, the default mechanism is used. For more information on security mechanism names, see the description of the libtcl.cfg file in the Open Client and Open Server Configuration Guide for Microsoft Windows.
Executes the command.
isql
Password:
1>select *
2>from authors
3>where city = "Oakland"
4>go
Lets you edit the query. When you write and save the file, you are returned to isql. The query is displayed. Type go to execute it.
isql -Ujoe -Pabracadabra
1>select *
2>from authors
3>where city = "Oakland"
4>ed
reset clears the query buffer. quit returns you to the operating system.
isql -U alma Password:
1>select *
2>from authors
3>where city = "Oakland"
4>reset
5>quit
To use isql interactively, give the command isql (and any of the optional flags) at your operating system prompt. The isql program accepts SQL commands and sends them to Adaptive Server. The results are formatted and printed on standard output. Exit isql with quit or exit.
Terminate a command by typing a line beginning with the default command terminator go or other command terminator if the -c option is used. You may follow the command terminator with an integer to specify how many times to run the command. For example, to execute this command 100 times, type:
select x = 1
go 100
The results display once at the end of execution.
If you enter an option more than once on the command line, isql uses the last value. For example, if you enter the following command:
isql -c. -csend
“send”, the second value for -c, overrides “.”, the first value. This enables you to override any aliases you set up.
To clear the existing query buffer, type reset on a line by itself. isql discards any pending input. You can also press Ctrl-C anywhere on a line to cancel the current query and return to the isql prompt.
Case is significant for the isql flags.
isql displays only 6 digits of float or real data after the decimal point, rounding off the remainder.
When using isql interactively, read an operating system file into the command buffer with the command:
:r filename
Do not include a command terminator in the file; enter the terminator interactively once you have finished editing.
You can include comments in a Transact-SQL statement submitted to Adaptive Server by isql. Open a comment with “/*”. Close it with “*/” as the following example demonstrates:
select au_lname, au_fname /*retrieve authors’ last and first names*/ from authors, titles, titleauthor where authors.au_id = titleauthor.au_id and titles.title_id = titleauthor.title_id /*this is a three-way join that links authors **to the books they have written.*/
If you want to comment out a go command, it should not be at the beginning of a line. For example, to comment out the go command use:
/*
**go
*/
instead of:
/*
go
*/
isql for System 11 is built with Client-Library. The isql user interface is unchanged except:
The 5701 (“changed database”) server message is no longer displayed after login or issuing a use database command.
There are two new optional flags:
-b – disables column headers from printing -D database – selects the start-up database that isql uses
The following command-line options have been added to enable network-based security services on the connection:
-K keytab_file -R remote_server_principal -V security_options -Z security_mechanism
Error message format is different from previous versions of isql. If you have scripts that perform routines based on the values of these messages, you may need to rewrite them.
The -y sybase_directory option has been removed.
To exit from isql: quit or exit
To clear the query buffer: reset
To execute an operating system command:!! command
sp_addlanguage, sp_addlogin, sp_configure, sp_defaultlanguage, sp_droplanguage, and sp_helplanguage in the Adaptive Server Reference Manual.