isql

Description

Interactive SQL parser to Adaptive Server. Located in $SYBASE/ASE-12_5/bin.

NoteIn Windows NT, the utility is isql.exe, located in %SYBASE%\ASE-12_5\bin.

Syntax

isql [-b] [-e] [-F] [-p] [-n] [-v] [-X] [-Y] [-Q]
	[-a display_charset]
	[-A packet_size]
	[-c cmdend]
	[-D database]
	[-E editor]
	[-h headers]
	[-H hostname]
	[-i inputfile]
	[-I interfaces_file]
	[-J client_charset]
	[-K keytab_file]
	[-l login_timeout]
	[-m errorlevel]
	[-o outputfile]
	[-P password]
	[-R remote_server_principal]
	[-s colseparator]
	[-S server_name]
	[-t timeout]
	-U username
	[-V [security_options]]
	[-w columnwidth]
	[-z locale_name]
	[-Z security_mechanism]

Parameters

-b

disables the display of the table headers output.

-e

echoes input.

-F

enables the FIPS flagger. When you specify the -F parameter, the server returns a message when it encounters a non-standard SQL command. This option does not disable SQL extensions. Processing completes when you issue the non-ANSI SQL command.

-p

prints performance statistics.

-n

removes numbering and the prompt symbol (>) from the echoed input lines in the output file when used in conjunction with -e.

-v

prints the version number and copyright message for isql and then exits.

-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 that 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 chained transactions.

-Q

provides clients with failover property. See Using Sybase Failover in a High Availability System for more information.

-a display_charset

runs isql from a terminal whose character set differs from that of the machine on which isql is running. Use -a in conjunction with -J to specify 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.

NoteThe ascii_7 character set is compatible with all character sets. If either the Adaptive Server character set or the client character set is set to ascii_7, any 7-bit ASCII character can pass unaltered between client and server. Other characters produce conversion errors. For more information on character set conversion, see the System Administration Guide.

-A packet_size

specifies the network packet size to use for this isql session. For example, the following sets the packet size to 2048 bytes for this isql session:

isql -A 2048
-c cmdend

changes the command terminator. By default, you terminate commands and send them to by typing “go” on a line by itself. When you change the command terminator, do not use SQL reserved words or control characters.

-D database

selects the database in which the isql session begins.

-E editor

specifies an editor other than the default editor vi.

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

specifies the name of the operating system file to use for input to isql. The file must contain command terminators (“go” is the 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 a file named interfaces in the directory specified by your 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. F or more information about character sets and the associated flags, see Chapter 20, “Configuring Client/Server Character Set Conversions,” in the System Administration Guide. The default character sets for different platforms are:

Platform

Default character set

Sun Solaris, Digital UNIX, Pyramid, NCR, RS/6000

iso_1

HP-UX

roman8

OS/2, Novell NetWare 386

cp850

Macintosh

mac

-K keytab_file

specifies the path to the keytab file used for authentication in DCE.

-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 are displayed; no error text appears. For error levels lower than the specified level, nothing appears.

-o outputfile

specifies the name of an operating system file to store the output from isql. Specifying the parameter as -o outputfile is similar to outputfile

-P password

specifies your Adaptive Server password. If you do not specify the -P flag, isql prompts for a password. If your password is NULL, use the -P flag without any password.

-R remote_server_principal

specifies the principal name for the server as defined to the security mechanism. By default, a server’s principal name matches the server’s network name (which is specified with the -S parameter or the DSQUERY environment variable). Use the -R parameter 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_name

specifies the name of the Adaptive Server to which to connect. isql looks this name up in the interfaces file. If you specify -S with no argument, isql looks for a server named SYBASE. If you do not specify -S, isql looks for the server specified by your DSQUERY environment variable.

-t timeout

specifies the number of seconds before a SQL command times out. If you do not specify a timeout, the 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. Login names 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

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

-z locale_name

is the official name of an alternate language to display isql prompts and messages. Without -z, isql uses the server’s default language. You can add languages to an Adaptive Server during installation or afterward, using the langinstall utility or the sp_addlanguage stored procedure.

-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/Server Configuration Guide.

Examples

Example 1

This example puts you in a text file where you can edit the query. When you write and save the file, you are returned to isql. The query appears; type “go” on a line by itself to execute it:

isql -Ujoe -Pabracadabra
1> select *
2> from authors
3> where city = "Oakland"
4> vi

Example 2

reset clears the query buffer. quit returns you to the operating system:

isql -Ualma
Password:
1> select *
2> from authors
3> where city = "Oakland"
4> reset
1> quit

Example 3

Specifies that you are running isql from a Macintosh against a server that is using the roman8 character set:

isql -a mac -J roman8

Usage

See also

See Chapter 2, “Using the isql Utility” for details on isql.

See the Reference Manual for more information regarding default network packet size and maximum network packet size configuration parameters.

Commandscreate schema, set

Datatypeexact numeric datatypes

System ESPxp_sendmail

System proceduressp_addlanguage, sp_addlogin, sp_addremotelogin, sp_add_resource_limit, sp_bindexeclass, sp_configure, sp_defaultlanguage, sp_droplanguage, sp_helplanguage, sp_processmail, sp_remoteoption, sp_serveroption, sp_showcontrolinfo, sp_unbindexeclass, sp_volchanged