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] 
[-Q option]|
[-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, 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.

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

-I interfaces_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.

-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 outputfilename

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

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

-Q option

Allows HA Failover.

-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. The default timeout for logging into isql is 60 seconds.

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

-Y

Tells the Adaptive Server to use chain transactions.

-z language

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 Microsoft Windows.

Examples

Example 1

Executes the command.

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

Example 2

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

Example 3

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

Usage


New features

isql for System 11 is built with Client-Library. The isql user interface is unchanged except:


Additional commands within isql:

See also

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