fisql — interactive SQL shell
Contents
Bugs
Requires the GNU readline library.
FreeTDS 1.3.17 March 25, 2015 FISQL(FreeTDS)
Description
fisql is very similar to the ‘isql’ utility programs distributed by Sybase and Microsoft. Like them,
fisql uses the command ‘go’ on a line by itself as a separator between batches.
History
fisql first appeared in FreeTDS 0.65.
Name
fisql — interactive SQL shell
Notes
fisql is a filter; it reads from standard input, writes to standard output, and writes errors to standard
error. The -i, and -e options override these defaults.
fisql uses the DB-Library API provided by FreeTDS. It was first implemented using Sybase's own library
and continues to work with it. Before (and after) modifying it, it would be well to test it with Sybase's
library to assure compatibility between it and FreeTDS. EXIT STATUS
fisql exits 0 on success, and >0 if the server cannot process the query.
fisql will report any errors returned by the server, but will continue processing. In a production
environment, this behavior may be insufficiently stringent. To make it extremely intolerant of errors,
change the message and error handlers to call exit(3).
Options
-adisplay_charset
The client charset name. Not implemented.
-Apacket_size
Set protocol packet size. You should not need to set this parameter.
-ccmdend
Command terminator, defaults to ‘go’.
-D Database name on the server to use.
-e Echo SQL input (usually in outputfile)
-Eeditor
Specify an editor to invoke. Defaults to vi.
-F FIPS mode ON. Server returns a message (but processes the query anyway) when it encounters a non-
standard SQL command.
-g Display a brief help message
-hheaders
Number of rows after which to repeat the column headers. Default is once per resultset.
-Hhostname
Hostname of the client machine as it will be told to the server.
-Iinterfaces_file
Name of the interfaces or freetds.conf file to use.
-iinputfile
Name of script file, containing SQL.
-Jclient_charset
Not implemented.
-llogin_timeout
How long to wait for the server to acknowledge a login attempt.
-merrorlevel
For errors of the severity level specified or higher, print only the message number, state, and
error level. Below that level, print nothing.
-n Suppress line numbers in echoed output.
-ooutputfile
Name of output file, holding result data.
-p Prints performance statistics. Not implemented.
-Ppassword
Database server password.
-scolseparator
The column separator. Default is space. Shell metacharacters require quoting.
-Sserver
Database server to which to connect.
-ttimeout
The query timeout, in seconds. How long to wait for a query to be processed. The default is
indefinitely, or as determined by freetds.conf.
-Uusername
Database server login name.
-v Display version and copyright.
-wwidth
How many characters wide to print the output. Defaults to 80.
-X Use encrypted login. Not implemented in FreeTDS.
-ysybase_dir
Sets the SYBASE environment variable. Not used by FreeTDS.
-Y Use chained transactions.
-zlanguage
Name of a language for fisql's prompts and messages. Cf. DBSETLNATLANG.
Synopsis
fisql [-eFgpnvXY] [-adisplay_charset] [-Apacket_size] [-ccmdend] [-Ddatabase] [-Eeditor]
[-hheaders] [-Hhostname] [-iinputfile] [-Iinterfaces_file] [-Jclient_charset]
[-llogin_timeout] [-merrorlevel] [-ooutputfile] [-Ppassword] [-scolseparator] [-Sserver]
[-ttimeout] [-Uusername] [-wwidth] [-ysybase_dir] [-zlanguage]
