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

NAME

6       tsql - utility to test FreeTDS connections and queries
7

SYNOPSIS

9       tsql   { -S servername [-I interface] | -H hostname -p port }
10              -U username [-P password] [-o options]
11
12       tsql   -C
13

DESCRIPTION

15       tsql  is a diagnostic tool provided as part of FreeTDS. It uses the TDS
16       protocol directly to connect to Sybase or Microsoft  SQL  Servers,  and
17       allows the user to issue queries that test the capabilities of FreeTDS.
18
19       tsql  is  *not*  a  replacement  for  a  complete  isql,  such  as sqsh
20       (www.sqsh.org).  It is designed to rely on  the  lowest  level  FreeTDS
21       library,  tdslib,  as  a  way to isolate potential bugs in the protocol
22       implementation.
23
24       tsql can be run in two ways, one which uses the  freetds.conf  and  one
25       which connects directly using the server's hostname and port.
26
27       When  -S  is  used,  FreeTDS  uses the freetds.conf (or equivalent) and
28       environment variables in the normal way to determine  the  server's  ip
29       address  and  port.  You  can  use -I to specify a filename, overriding
30       FreeTDS's configuration file search algorithm.
31
32       The -H and -p parameters are provided  especially  for  troubleshooting
33       new configurations (or servers). Use of these parameters causes FreeTDS
34       to ignore any freetds.conf and environment variables.
35

OPTIONS

37       -S servername
38              the Database Server to which to connect.
39
40       -I interface
41              a freetds.conf or interfaces file describing servername
42
43       -H hostname
44              the DNS hostname of the server
45
46       -p port
47              the port at which SQL Server is listening
48
49       -U username
50              database login name. If username is not provided, a domain login
51              is attempted for TDS 7+ connections.
52
53       -P password
54              database password.
55
56       -L list server "instances" (with -H)
57
58       -C     prints some of the compile-time configuration parameters.
59
60       -o options
61              apply the options specified to every command.
62
63              f      No footer       [result count]
64
65              h      No header       [titles]
66
67              t      Print time
68
69              v      Print version
70
71              q      Quiet
72

NOTES

74       Typing "exit", "quit", or "bye" (or ^D) exits tsql.
75
76       Typing "version" displays the TDS protocol version.
77
78       Command  batches  may be separated with "go" or "GO". If "GO", the ver‐
79       sion string is reported before executing the batch.
80
81       After prompting for the password, tsql will attempt to connect  to  the
82       remote
83
84       server.
85              tsql displays a counter indicating the number of seconds that
86
87       it is attempting to connect.
88              Typically, tsql should immediately respond
89
90       with a '1>' prompt.
91              If  you  see  the  counter  (1,  2, 3, ...), most likely tsql is
92              unable to connect to the indicated server.
93
94       If you can connect  with  "tsql  -S  servername",  your  basic  FreeTDS
95       installation is working.
96
97       If you have suggestions for ways to make tsql more useful as a diagnos‐
98       tic tool, please recommend them to the FreeTDS mailing list for consid‐
99       eration.
100

HISTORY

102       tsql first appeared in FreeTDS 0.60.
103

AUTHORS

105       The tsql utility was written by Brian Bruns.
106

BUGS

108       Several, to be sure, now that it's documented. :)
109
110
111
112FreeTDS Utilities                   0.91RC2              FreeTDS(May 14, 2011)
Impressum