1FreeTDS(May 14, 2011) FreeTDS(May 14, 2011)
2
3
4
6 bsqlodbc - batch SQL script processor using ODBC
7
9 bsqlodbc [-U username] [-P password] [-S server] [-D database]
10 [-i input_file] [-o output_file] [-e error_file]
11 [-t field_term] [-qv]
12
14 bsqlodbc is a utility program distributed with FreeTDS.
15
16 bsqlodbc is a non-interactive equivalent of the "isql" utility programs
17 distributed by Sybase and Microsoft. Like them, bsqlodbc uses the com‐
18 mand "go" on a line by itself as a separator between batches. The last
19 batch need not be followed by "go".
20
21 bsqlodbc makes use of the ODBC API provided by FreeTDS. This API is of
22 course also available to application developers.
23
25 -U username
26 Database server login name.
27
28 -P password
29 Database server password.
30
31 -S server
32 Database server to which to connect.
33
34 -D database
35 Database to use.
36
37 -i input_file
38 Name of script file, containing SQL.
39
40 -o output_file
41 Name of output file, holding result data.
42
43 -e error_file
44 Name of file for errors.
45
46 -t field_term
47 Specifies the field terminator. Default is two spaces (' ').
48 Recognized escape sequences are tab ('\t'), carriage return
49 ('\r'), newline ('\n'), and backslash ('\\').
50
51 -h Print column headers with the data to the same file.
52
53 -q Do not print column metadata, return status, or rowcount. Over‐
54 rides -h.
55
56 -v Verbose mode, for more information about the ODBC interaction.
57 This also reports the result set metadata, including and return
58 code. All verbose data are written to standard error (or -e), so
59 as not to interfere with the data stream.
60
62 bsqlodbc is a filter; it reads from standard input, writes to standard
63 output, and writes errors to standard error. The -i, -o, and -e options
64 override these, of course.
65
67 bsqlodbc exits 0 on success, and >0 if the server cannot process the
68 query.
69
71 bsqlodbc first appeared in FreeTDS 0.65.
72
74 The bsqlodbc utility was written by James K. Lowden <jklow‐
75 den@freetds.org>
76
77FreeTDS Utilities 0.91RC2 FreeTDS(May 14, 2011)