1FreeTDS(May 14, 2011)                                    FreeTDS(May 14, 2011)
2
3
4

NAME

6       bsqldb - batch SQL script processor using DB-Library
7

SYNOPSIS

9       bsqldb [-U username] [-P password] [-S servername] [-D database]
10       [-i input_file] [-o output_file] [-e error_file] [-H hostname]
11       [-t field_term] [-hqv]
12

DESCRIPTION

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

OPTIONS

25       -U username
26              Database  server  login  name.  If  username  is not provided, a
27              domain login is attempted for TDS 7+ connections.
28
29       -P password
30              Database server password.
31
32       -S servername 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       -H     hostname Override name of client sent to server.
54
55       -q     Do not print column metadata, return status, or rowcount.  Over‐
56              rides -h.
57
58       -v     Verbose  mode,  for  more  information  about the DB-Libraryrary
59              interaction.  This also reports the result set metadata, includ‐
60              ing  and  return  code. All verbose data are written to standard
61              error (or -e), so as not to interfere with the data stream.
62

ENVIRONMENT

64       DSQUERY
65              default servername
66

NOTES

68       bsqldb is a filter; it reads from standard input,  writes  to  standard
69       output, and writes errors to standard error. The -i, -o, and -e options
70       override these, of course.
71
72       The source code for bsqldb is intended as a model for DB-Library users.
73       DB-Library has a rich set of functions, and it can be hard sometimes to
74       understand how to use them, particularly the first  time.  If  you  are
75       using  it in this way and find something unclear, you are encouraged to
76       email the author your comments.
77

EXIT STATUS

79       bsqldb exits 0 on success, and >0 if  the  server  cannot  process  the
80       query.
81
82       bsqldb will report any errors returned by the server, but will continue
83       processing. In a production environment, this behavior may be  insuffi‐
84       ciently  stringent.  To  make it extremely intolerant of errors, change
85       the message and error handlers to call exit(3).
86

HISTORY

88       bsqldb first appeared in FreeTDS 0.63.
89

AUTHORS

91       The bsqldb utility was written by James K.  Lowden  <jklowden@schemama‐
92       nia.org>
93

BUGS

95       Microsoft servers as of SQL Server 7.0 SP 3 do not return output param‐
96       eters unless the RPC functions  are  used.  This  means  bsqldb  cannot
97       return output parameters for stored procedures with these servers.
98
99
100
101FreeTDS Utilities                   0.91RC2              FreeTDS(May 14, 2011)
Impressum