isql

Description

Interactive SQL parser to Adaptive Server.

Syntax

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]

Parameters

-a display_charset

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.

-A size

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.

-c cmdend

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.

-D database

selects a database that the isql session begins in.

-e

echoes input.

-E editor

specifies an editor other than your default editor.

-F

enables the FIPS flagger. With this option, the Adaptive Server flags any nonstandard SQL commands sent.

-h headers

specifies the number of rows to print between column headings. The default prints headings only once for each set of query results.

-H hostname

sets the client host name.

-i inputfilename

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.

-Iinterfaces_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.

-J client_charset

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.

-K keytab_file

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.

-l login_timeout

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.

-m errorlevel

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.

-n

removes numbering and the prompt symbol (>) from input lines.

-o output_filename

specifies the name of an operating system file to store the output from isql.

-o outputfile

which is similar to:

> outputfile

-p

prints performance statistics.

-P password

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.

-R remote_server_principal

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.

-s colseparator

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.

-S server

specifies the name of the Adaptive Server to connect to. Without -S, isql looks for the server specified by your DSQUERY environment variable.

-t timeout

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.

-U username

specifies a login name. Logins are case sensitive.

-V security_options

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

-v

prints the version and copyright message of the isql software that you are using.

-w columnwidth

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.

-X

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.

-Y

tells the Adaptive Server to use chain transactions.

-z language

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.

-Z security_mechanism

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.

Examples

Example 1

isql 
Password:

 1>select * 
 2>from authors 
 3>where city = "Oakland" 
4>go 

Executes the command.

Example 2

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.

Example 3

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.

Usage


isql

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:


Additional commands within isql:

Table A-7: isql session commands

Command

Description

reset

Clears the query buffer

quit or exit

Exits from isql

vi

Calls the editor

!! command

Executes an operating system command

See also

sp_addlanguage, sp_addlogin, sp_configure, sp_defaultlanguage, sp_droplanguage, and sp_helplanguage in the Adaptive Server Enterprise Reference Manual.