1BSQLODBC(FreeTDS)          FreeTDS Reference Manual          BSQLODBC(FreeTDS)
2

NAME

4     bsqlodbc — batch SQL script processor using ODBC
5

SYNOPSIS

7     bsqlodbc [-hqv] [-U username] [-P password] [-S server] [-D database]
8              [-i input_file] [-o output_file] [-e error_file] [-t field_term]
9              [-V odbc_version]
10

DESCRIPTION

12     bsqlodbc is a utility program distributed with FreeTDS.
13
14     bsqlodbc is a non-interactive equivalent of the ‘isql’ utility programs
15     distributed by Sybase and Microsoft. Like them, bsqlodbc uses the command
16     ‘go’ on a line by itself as a separator between batches. The last batch
17     need not be followed by ‘go’.
18
19     bsqlodbc makes use of the ODBC API provided by FreeTDS. This API is of
20     course also available to application developers.
21

OPTIONS

23     -U username
24             Database server login name.
25
26     -P password
27             Database server password.
28
29     -S server
30             Database server to which to connect.
31
32     -D database
33             Database to use.
34
35     -i input_file
36             Name of script file, containing SQL.
37
38     -o output_file
39             Name of output file, holding result data.
40
41     -e error_file
42             Name of file for errors.
43
44     -t field_term
45             Specifies the field terminator. Default is two spaces ( ‘  ’ ).
46             Recognized escape sequences are tab ( ‘\t’ ), carriage return (
47             ‘\r’ ), newline ( ‘\n’ ), and backslash ( ‘\\’ ).
48
49     -h      Print column headers with the data to the same file.
50
51     -q      Do not print column metadata, return status, or rowcount. Over‐
52             rides -h.
53
54     -v      Verbose mode, for more information about the ODBC interaction.
55             This also reports the result set metadata, including and return
56             code. All verbose data are written to standard error (or -e), so
57             as not to interfere with the data stream.
58
59     -V odbc_version
60             Specify ODBC version (2 or 3).
61

NOTES

63     bsqlodbc is a filter; it reads from standard input, writes to standard
64     output, and writes errors to standard error. The -i, -o, and -e options
65     override these defaults.
66

EXIT STATUS

68     bsqlodbc exits 0 on success, and >0 if the server cannot process the
69     query.
70

HISTORY

72     bsqlodbc first appeared in FreeTDS 0.65.
73

AUTHORS

75     The bsqlodbc utility was written by James K. Lowden
76     <jklowden@freetds.org>.
77
78FreeTDS 1.00.38                 March 25, 2015                 FreeTDS 1.00.38
Impressum