1OSQL(FreeTDS)              FreeTDS Reference Manual              OSQL(FreeTDS)
2

NAME

4     osql — utility to test FreeTDS connections and queries
5

SYNOPSIS

7     osql -S dsn -U username -P password [-I ini_directory]
8

DESCRIPTION

10     osql is a diagnostic tool provided as part of FreeTDS. It is a Bourne
11     shell script that checks and reports on your configuration files. If
12     everything checks out OK, it invokes isql.
13
14     osql works only with the isql that comes with unixODBC.
15

OPTIONS

17     -S dsn  the Data Source Name to which to connect, as known to odbc.ini.
18
19     -U username
20             database login name.
21
22     -P password
23             database password.
24
25     -I ini_dir
26             override odbc.ini file location.
27

EXAMPLE

29     If you have an odbc.ini with a section like this:
30
31           [myDSN]
32           servername = myserver
33           TDS_Version = 5.0
34
35     You would invoke osql as:
36
37     osql -S myDSN [...]
38

FILES

40     odbc.ini freetds.conf
41

NOTES

43     If you can connect with ‘osql -S servername -U user -P passwd’, your
44     FreeTDS ODBC installation is working.
45
46     osql guesses where unixODBC might look for its odbc.ini by examining the
47     binary. This is not always an effective approach. If it doesn't work,
48     you'll receive a report of candidate strings. Kindly pass along the out‐
49     put to help improve the guessing.
50
51     If osql cannot intuit your odbc.ini directory, you can force the issue
52     with the -I option. However, you're then instructing osql what to test,
53     not where unixODBC will eventually look. Your override is therefore only
54     as good as you are. Look carefully at the error output before overriding.
55
56     If you have suggestions for ways to make osql more useful as a diagnostic
57     tool, please post them to the FreeTDS mailing list.
58

HISTORY

60     osql first appeared in FreeTDS 0.65.
61

AUTHORS

63     The osql utility was written by James K. Lowden.
64
65FreeTDS 1.00.38                 April 26, 2012                 FreeTDS 1.00.38
Impressum