.\"Text automatically generated by txt2man .TH fisql 1 "13 November 2011" "doc" "FreeTDS Utilities" .SH NAME \fBfisql \fP- interactive SQL shell \fB .SH SYNOPSIS .nf .fam C \fBfisql\fP [\fB-e\fP] [\fB-F\fP] [\fB-g\fP] [\fB-p\fP] [\fB-n\fP] [\fB-v\fP] [\fB-X\fP] [\fB-Y\fP] \[a] [\fB-a\fP \fIdisplay_charset\fP] [\fB-c\fP \fIcmdend\fP] \[a] [\fB-D\fP \fIdatabase\fP] [\fB-E\fP \fIeditor\fP] \[a] [\fB-h\fP \fIheaders\fP] [\fB-H\fP \fIhostname\fP] [\fB-i\fP \fIinputfile\fP] \[a] [\fB-I\fP \fIinterfaces_file\fP] [\fB-J\fP \fIclient_charset\fP] \[a] [\fB-l\fP \fIlogin_timeout\fP] [\fB-m\fP \fIerrorlevel\fP] \[a] [\fB-o\fP \fIoutputfile\fP] \[a] [\fB-P\fP \fIpassword\fP] [\fB-s\fP \fIcolseparator\fP] [\fB-S\fP \fIserver\fP] \[a] [\fB-t\fP \fItimeout\fP] [\fB-U\fP \fIusername\fP] [\fB-w\fP \fIwidth\fP] \[a] [\fB-y\fP \fIsybase_dir\fP] [\fB-z\fP \fIlanguage\fP] .fam T .fi .fam T .fi .SH DESCRIPTION \fBfisql\fP is very similar to the "isql" utility programs distributed by Sybase and Microsoft. Like them, \fBfisql\fP uses the command "go" on a line by itself as a separator between batches. .SH OPTIONS .TP .B \fB-a\fP \fIdisplay_charset\fP The client charset name. Not implemented. .TP .B \fB-c\fP \fIcmdend\fP Command terminator, defaults to go. .TP .B \fB-D\fP Database name on the \fIserver\fP to use. .TP .B \fB-e\fP Echo SQL input (usually in \fIoutputfile\fP) .TP .B \fB-E\fP \fIeditor\fP Specify an \fIeditor\fP to invoke. Defaults to vi. .TP .B \fB-F\fP FIPS mode ON. Server returns a message (but processes the query anyway) when it encounters a non-standard SQL command. .TP .B \fB-g\fP Display a brief help message .TP .B \fB-h\fP \fIheaders\fP Number of rows after which to repeat the column \fIheaders\fP. Default is once per resultset. .TP .B \fB-H\fP \fIhostname\fP Hostname of the client machine as it will be told to the \fIserver\fP. .TP .B \fB-I\fP \fIinterfaces_file\fP Name of the interfaces or freetds.conf file to use. .TP .B \fB-i\fP \fIinputfile\fP Name of script file, containing SQL. .TP .B \fB-J\fP \fIclient_charset\fP Not implemented. .TP .B \fB-l\fP \fIlogin_timeout\fP How long to wait for the \fIserver\fP to acknowledge a login attempt. .TP .B \fB-m\fP \fIerrorlevel\fP For errors of the severity level specified or higher, print only the message number, state, and error level. Below that level, print nothing. .TP .B \fB-n\fP Suppress line numbers in echoed output. .TP .B \fB-o\fP \fIoutputfile\fP Name of output file, holding result data. .TP .B \fB-p\fP Prints performance statistics. Not implemented. .TP .B \fB-P\fP \fIpassword\fP Database \fIserver\fP \fIpassword\fP. .TP .B \fB-s\fP \fIcolseparator\fP The column separator. Default is space. Shell metacharacters require quoting. .TP .B \fB-S\fP \fIserver\fP Database \fIserver\fP to which to connect. .TP .B \fB-t\fP \fItimeout\fP The query \fItimeout\fP, in seconds. How long to wait for a query to be processed. The default is indefinitely, or as determined by freetds.conf. .TP .B \fB-U\fP \fIusername\fP Database \fIserver\fP login name. .TP .B \fB-v\fP Display version and copyright. .TP .B \fB-w\fP \fIwidth\fP How many characters wide to print the output. Defaults to 80. .TP .B \fB-X\fP Use encrypted login. Not implemented in FreeTDS. .TP .B \fB-y\fP \fIsybase_dir\fP Sets the SYBASE environment variable. Not used by FreeTDS. .TP .B \fB-Y\fP Use chained transactions. .TP .B \fB-z\fP \fIlanguage\fP Name of a \fIlanguage\fP for \fBfisql\fP's prompts and messages. Cf. DBSETLNATLANG. .SH NOTES \fBfisql\fP is a filter; it reads from standard input, writes to standard output, and writes errors to standard error. The \fB-i\fP, \fB-o\fP, and \fB-e\fP options override these, of course. .PP \fBfisql\fP uses the db-lib 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. .SH EXIT STATUS \fBfisql\fP exits 0 on success, and >0 if the \fIserver\fP cannot process the query. .PP \fBfisql\fP will report any errors returned by the \fIserver\fP, 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 \fBexit\fP(3). .SH HISTORY \fBfisql\fP first appeared in FreeTDS 0.65. .SH AUTHORS The \fBfisql\fP utility was written by Nicholas S. Castellano , who contributed it to the FreeTDS project under the terms of the GPL. .SH BUGS Requires the GNU readline library.