A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X  Y  Z  special characters  sybase-tech-blog


Category: ASE: Executables

isql

isql is a client executable of Adaptive Server® Enterprise. It is a command line oriented, T-SQL-based, interactive query tool. It is available for UNIX/Linux and for Windows-platforms.

Usage of the executable isql

isql is located in the $SYBASE/bin directory. In order to work with isql, the command "isql" has to be entered at the operating system prompt followed by the required parameters and flags or options. These parameters is information required by the client executable isql in order to connect to the ASE-Server. Following the command execution a prompt will request a password to authenticate the user account on the server. The password will not be shown on the screen. If the password is correct one will be presented with the isql command prompt ">". The isql command line can be exited by typing "quit" or "exit". As long as the connection is established, commands can be send to the ASE-server.

Prerequisites for the successful execution of isql

In order to start isql, all ASE specific environment variables have to be set correctly. Furthermore, isql requires a corrsponding entry for the ASE-server to which it wants to connect, which needs to be stored in the interfaces file (UNIX/Linux) or in the sql.ini file (Windows) respectively.

Parameters, flags, options for the isql executable

All isql parameters are prefixed with a minus sign "-" followed by a character and without blanks. The following is a description of all isql specific parameters optional and required.

  • -S server_name (Name of the ASE-server to which the user wants to connect)
  • -U login_name (Login name of the user)
  • -P password (Corresponding password of the user)
  • -I interfaces_file (the interfaces file to be used)
  • -A network_packet_size (size of the network packages)
  • -X (encrypted user password)
  • -a display_character_set (displays the "character set" used)
  • -J client_character_set (converts the given "character sets" ; "-J" without parameter suppresses the conversion)
  • -z language (the language used for standard output and error messages)
  • -R remote_principal_srvname (the server used for standard security mechanisms)
  • -K keytab_file (the keytab file; only used by DCE )
  • -V security_options (uses network authentication before eventually logging in to the ASE-server)
  • -Z security_mechanism (a security mechanism defined in the libctl.cfg file)
  • -v (displays the version number of the Open Client)
  • -b (suppresses column headers)
  • -e (returns T-SQL commands)
  • -F (corresponding to the FIPS-Flagger displays warnings when using T-SQL commands)
  • -n (suppresses the prompt and line numbering)
  • -p (returns the run-time of the commands executed)
  • -Y (used like "set chained on" the chained transaction mode)
  • -c cmd_string (executing command string in lower case; default is "go")
  • -D dn_name (the default database after logging in)
  • -E editor (Editor to edit commands; default is "vi" or "EDIT.com")
  • -h headers_row (number of displayed rows before the column headers are repeated)
  • -H host_name (sets the value for sysprocesses.hostname )
  • -i input_file_name (Path and name of a file with T-SQL commands)
  • -o output_file_name (Path and name of a file to store the standard output)
  • -m error_level (suppresses error messages of a severity less than the passed severity)
  • -s col_seperator (A single character used to seperate columns; default delimiter is a blank)
  • -l login_timeout (timeout after an unsuccessful login attempt in seconds; default timeout is 60 seconds)
  • -t cmd_timeout (timeout of an unsuccessful command in seconds)
  • -w col_width (length of the displayed row in characters; default width is 80 characters)
  • -Q (creates a HA, i.e. a High Availability connection; starting with ASE version 12.0)

isql Syntax:

    isql
      [-a display_character_set]
      [-A network_packet_size]
      [-b]
      [-c cmd_string]
      [-D db]
      [-E editor]
      [-e]
      [-F]
      [-h headers_row]
      [-H host]
      [-i input_from_file]
      [-I interfaces_file]
      [-J [client_character_set]]
      [-K keytab_file]
      [-l login_timeout]
      [-m error_level]
      [-n]
      [-o output_to_file]
      [-P password]
      [-p]
      [-Q]
      [-R remote_principal_srvname]
      [-S ASE_server_name]
      [-s col_seperator]
      [-t cmd_timeout]
      [-U login_name]
      [-V [security_options]]
      [-v]
      [-w col_width]
      [-X]
      [-Y]
      [-z language]
      [-Z security_mechanism]
    

Example for using the isql executable

A session using isql to connect to the ASE -server "<ASE_SERVER_NAME>" as user "sa" and with a row width of "250" characters.

    isql -S <ASE_SERVER_NAME> -U sa -w 250
    

CAVEAT: (security advice) Never use the parameter -P to send passwords to the ASE-server, as the password will be clearly visible in the process list of the operating system.