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] [-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, enter:
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).
Specifying the parameter as follows:
-i inputfile
is equivalent to:
< inputfile
If you use -i and do not specify your password on the command line, Adaptive Server prompts you for it. If you use < inputfile and do not specify your password on the command line, you must specify your password as the first line of the input file.
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. The default is 60 seconds. This value affects only the time that isql waits for the server to respond to a login attempt. To specify a timeout period for command processing, use the -t timeout parameter.
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.
curread (current read level) is the initial level of data that you can read during this session. curread must dominate curwrite.
curwrite (current write level) is the initial sensitivity level that is applied to any data that you write during this session.
maxread (maximum read level) is the maximum level at which you can read data. This is the upper bound to which you as a multilevel user can set your curread during the session. maxread must dominate maxwrite.
maxwrite (maximum write level) is the maximum level at which you can write data. This is the upper bound to which you as a multiuser can set your curwrite during a session. maxwrite must dominate minwrite and curwrite.
minwrite (minimum write level) is the minimum level at which you can write data. This is the lower bound to which you as a multiuser can set curwrite during a session. minwrite must be dominated by maxwrite and curwrite.
label_value is the actual value of the label, expressed in the human-readable format used on your system (for example, “Company Confidential Personnel”).
removes numbering and the prompt symbol (>) from input lines.
specifies the name of an operating system file to store the output from isql.
-o outputfile
which is similar to:
> outputfile
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.
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.
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.
If isql crashes, the system creates a core file which contains your password. If you did not use the encryption option, the password appears in plain text in the file. If you used the encryption option, your password is not readable.
tells the Adaptive Server to use chain transactions.
is 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 UNIX Platforms.
isql
Password:
1>select *
2>from authors
3>where city = "Oakland"
4>go
Executes the command.
isql -Ujoe -Pabracadabra
1>select *
2>from authors
3>where city = "Oakland"
4>vi
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 -U alma Password:
1>select *
2>from authors
3>where city = "Oakland"
4>reset
5>quit
reset clears the query buffer. quit returns you to the operating system.
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 allows you to override any aliases you set up.
To call an editor on the current query buffer, enter its name as the first word on a line. Define your preferred callable editor by specifying in with the EDITOR environment variable. If EDITOR is undefined, the default is vi.
Execute operating system commands by starting a line with “!!” followed by the command. Call alternate editors this way, without defining EDITOR.
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.
Read in an operating system file containing a query for execution by isql as follows:
isql -U alma -P****** < input_file
The file must include command terminator(s). The results appear on your terminal. Read in an operating system file containing a query and direct the results to another file as follows:
isql -U alma -P****** < input_file > output_file
Case is significant for the isql flags.
isql displays only six 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 following 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:
/*
**go
*/
should be used to comment out the go command instead of:
/*
go
*/
isql is built with Client-Library for better performance. isql_r is the same as isql and must be used if DCE is the default directory service for Sybase client applications or if you use DCE security services on bulk copy sessions.
The isql user interface is unchanged except for:
The 5701 (“changed database”) server message is no longer displayed after login or after 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 than 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.
Command |
Description |
---|---|
reset |
Clears the query buffer |
quit or exit |
Exits from isql |
vi |
Calls the editor |
!! command |
Executes an operating system command |
sp_addlanguage, sp_addlogin, sp_configure, sp_defaultlanguage, sp_droplanguage, and sp_helplanguage in the Adaptive Server Enterprise Reference Manual.