.\"Text automatically generated by txt2man .TH bsqlodbc 1 "13 November 2011" "doc" "FreeTDS Utilities" .SH NAME \fBbsqlodbc \fP- batch SQL script processor using ODBC \fB .SH SYNOPSIS .nf .fam C \fBbsqlodbc\fP [\fB-U\fP \fIusername\fP] [\fB-P\fP \fIpassword\fP] [\fB-S\fP \fIserver\fP] [\fB-D\fP \fIdatabase\fP] [\fB-i\fP \fIinput_file\fP] [\fB-o\fP \fIoutput_file\fP] [\fB-e\fP \fIerror_file\fP] [\fB-t\fP \fIfield_term\fP] [\fB-qv\fP] .fam T .fi .fam T .fi .SH DESCRIPTION \fBbsqlodbc\fP is a utility program distributed with FreeTDS. .PP \fBbsqlodbc\fP is a non-interactive equivalent of the "isql" utility programs distributed by Sybase and Microsoft. Like them, \fBbsqlodbc\fP uses the command "go" on a line by itself as a separator between batches. The last batch need not be followed by "go". .PP \fBbsqlodbc\fP makes use of the ODBC API provided by FreeTDS. This API is of course also available to application developers. .SH OPTIONS .TP .B \fB-U\fP \fIusername\fP Database \fIserver\fP login name. .TP .B \fB-P\fP \fIpassword\fP Database \fIserver\fP \fIpassword\fP. .TP .B \fB-S\fP \fIserver\fP Database \fIserver\fP to which to connect. .TP .B \fB-D\fP \fIdatabase\fP Database to use. .TP .B \fB-i\fP \fIinput_file\fP Name of script file, containing SQL. .TP .B \fB-o\fP \fIoutput_file\fP Name of output file, holding result data. .TP .B \fB-e\fP \fIerror_file\fP Name of file for errors. .TP .B \fB-t\fP \fIfield_term\fP Specifies the field terminator. Default is two spaces (' '). Recognized escape sequences are tab ('\\t'), carriage return ('\\r'), newline ('\\n'), and backslash ('\\\\'). .TP .B \fB-h\fP Print column headers with the data to the same file. .TP .B \fB-q\fP Do not print column metadata, return status, or rowcount. Overrides \fB-h\fP. .TP .B \fB-v\fP Verbose mode, for more information about the ODBC interaction. This also reports the result set metadata, including and return code. All verbose data are written to standard error (or \fB-e\fP), so as not to interfere with the data stream. .SH NOTES \fBbsqlodbc\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. .SH EXIT STATUS \fBbsqlodbc\fP exits 0 on success, and >0 if the \fIserver\fP cannot process the query. .SH HISTORY \fBbsqlodbc\fP first appeared in FreeTDS 0.65. .SH AUTHORS The \fBbsqlodbc\fP utility was written by James K. Lowden .RE .PP