|database server to which to connect.|
|database to use.|
|freetds.conf or interfaces file describing servername.|
|DNS hostname of the server.|
|port at which SQL Server is listening.|
|database login name. If username is not provided, a domain login is attempted for TDS 7+ connections.|
|-L||list Microsoft server instances (with -H-).|
|-C||print some of the compile-time configuration parameters.|
|apply the options specified to every command.|
|-f||No footer [result count]|
|-h||No header [titles]|
If you can connect with tsql -S servername, your basic FreeTDS installation is working.
Typing exit, quit, or bye (or ^D) exits .
Typing version displays the TDS protocol version.
Command batches may be separated with go or GO. If GO the version string is reported before executing the batch.
After prompting for the password (if not provided with -P-), tsql will attempt to connect to the remote server. tsql displays a counter indicating the number of seconds elapsed during the connection attempt. Typically, tsql immediately responds with a 1> prompt. If you see the counter (1, 2, 3, ...), most likely tsql is unable to connect to the indicated server.
tsql is not a replacement for a complete isql such as sqsh (www.sqsh.org). If you have suggestions for ways to make tsql more useful as a diagnostic tool, please post them to the FreeTDS mailing list for consideration.
tsql first appeared in FreeTDS 0.60.
The tsql utility was written by
.An Brian Bruns Ns .
Several, to be sure, now that its documented. :)