.\"Text automatically generated by txt2man .TH osql 1 "13 November 2011" "doc" "FreeTDS Utilities" .SH NAME \fBosql \fP- utility to test FreeTDS connections and queries \fB .SH SYNOPSIS .nf .fam C \fBosql\fP \fB-S\fP \fIdsn\fP \fB-U\fP \fIusername\fP \fB-P\fP \fIpassword\fP [\fB-I\fP \fIini_dir\fP] .fam T .fi .fam T .fi .SH DESCRIPTION \fBosql\fP is a diagnostic tool provided as part of FreeTDS. It is a Bourne shell script that checks and reports on your configuration files. If everything checks out OK, it invokes isql. .PP \fBosql\fP works only with the isql that comes with unixODBC. .SH OPTIONS .TP .B \fB-S\fP \fIdsn\fP the Data Source Name to which to connect, as known to odbc.ini. .TP .B \fB-U\fP \fIusername\fP database login name. .TP .B \fB-P\fP \fIpassword\fP database \fIpassword\fP. .TP .B \fB-I\fP \fIini_dir\fP override odbc.ini file location. .SH EXAMPLE If you have an odbc.ini with a section like this: .PP .nf .fam C [myDSN] servername = myserver TDS_Version = 5.0 .fam T .fi You would invoke \fBosql\fP as: .PP .nf .fam C osql -S myDSN [\.\.\.] .fam T .fi .SH NOTES If you can connect with "\fBosql\fP \fB-S\fP servername \fB-U\fP user \fB-P\fP passwd", your FreeTDS ODBC installation is working. .PP \fBosql\fP guesses where unixODBC might look for its odbc.ini by examining the binary. This is not always an effective approach. If it doesn't work, you'll receive a report of candidate strings. Kindly pass along the output to help improve the guessing. .PP If \fBosql\fP cannot intuit your odbc.ini directory, you can force the issue with the \fB-I\fP option. However, you're instructing \fBosql\fP what to test, not where unixODBC will eventually look. Your override is therefore only as good as you are. Look carefully at the error output before overriding. .PP If you have suggestions for ways to make \fBosql\fP more useful as a diagnostic tool, please post them to the FreeTDS mailing list. .SH HISTORY \fBosql\fP first appeared in FreeTDS 0.65. .SH AUTHORS The \fBosql\fP utility was written by James K. Lowden