Usage for isql

Additional information for using isql.

  • If you are using threaded drivers, use the isql syntax for isql_r.

  • If you are using threaded drivers in the IBM platform, use the standard syntax for isql.

  • Before using isql, set the SYBASE environment variable to the location of the current version of Adaptive Server.

  • The 5701 (“changed database”) server message is no longer appears after logging in or issuing a use database command.

  • Error message format differs from versions of isql earlier than 15.7. If you have scripts that perform routines based on the values of these messages you may need to rewrite them.

  • When you include the -X parameter, the password-enabled connection proceeds according to server capabilities:
    • If the server can handle both extended password and password encryption, extended password encryption negotiations are used.

    • If the server can handle only password encryption, password encryption negotiations are used.

    • If the server cannot handle password encryption or extended password encryption, the first connection attempt fails and the client attempts to reconnect using a plain text password.

  • Terminate a command by typing a line beginning with the default command terminator go or another command terminator, if the -c parameter is used. Follow the command terminator with an integer to specify the number of times to run the command. For example, to execute this command 100 times, type:
    select x = 1
    go 100

    The results appear 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 this command, “send”, the second value for -c, overrides “.”, the first value:
    isql -c"." -csend

    This enables you to override any aliases you set up.

  • Execute operating system commands by starting a line with two exclamation points (!!) followed by the command.

  • To clear the existing query buffer, type reset on a line by itself. isql discards any pending input. 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:
    isql -U alma -Ppassword < input_file
    The file must include a command terminator. The results appear on your terminal. Read in an operating system file containing a query and direct the results to another file:
    isql -U alma -Ppassword < input_file > output_file
  • isql displays only six digits of float or real data after the decimal point, rounding off the remainder.

  • You can include comments in a Transact-SQL statement submitted to the SAP ASE server by isql. Open a comment with “/*”. Close it with “*/”, as shown in this example:
    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.*/
    Do not comment out a go command at the beginning of a line. For example, use this to comment out the go command:
    Do not use this:
  • isql defines the order of the date format as month, date, and year (mm dd yyyy hh:mmAM (or PM)), regardless of the locale environment. To change this default order, use the convert function.

  • In an isql session, the default prompt label is either the default wildcard :? or the value of wildcard. Customize the prompt label by providing a one-word character string, with a maximum length of 80 characters after a wildcard. If you specify a prompt label that is more than one word, the characters after the first word are ignored.

    Note: In an isql session, isql recognizes :?, or the value of wildcard, as wildcards only when these characters are placed at the beginning of an isql line.
See also:
  • Reference Manual: Building Blocksexact numeric datatypes, convert built-in function
  • Reference Manual: Commandscreate schema, set
  • Reference Manual: Proceduresxp_sendmail extended stored procedure, sp_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_unbinexeclass, sp_volchanged
  • System Administration Guide: Volume 1default network packet size and maximum network packet sizeconfiguration parameters