File: isql.1

package info (click to toggle)
unixodbc 2.3.4-1~bpo8%2B1
  • links: PTS, VCS
  • area: main
  • in suites: jessie-backports
  • size: 11,316 kB
  • sloc: ansic: 90,724; sh: 16,246; makefile: 1,561; yacc: 969; sql: 1
file content (139 lines) | stat: -rw-r--r-- 3,313 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
\" vim:language en_US.UTF-8:
.TH isql 1 "Tue 25 Jun 2013" "version 2.3.2" "UnixODBC manual pages"

.SH NAME
isql, iusql \- unixODBC command-line interactive SQL tool

.SH SYNOPSIS
\fBisql\fR \fIDSN\fR [\fIUSER\fR [\fIPASSWORD\fR]] [\fIoptions\fR] 

.SH DESCRIPTION
.B isql
is a command line tool which allows the user to execute SQL in batch
or interactively. It has some interesting options such as an option to generate
output wrapped in an HTML table.

.B iusql
is the same tool with built-in Unicode support.

.SH ARGUMENTS

.IP \fBDSN\fR
The Data Source Name, which should be used to make connection to the database.
The data source is looked for in the /etc/odbc.ini and $HOME/.odbc.ini files in
that order, with the latter overwriting the former.

.IP \fBUSER\fR
Specifies the database user/role under which the connection should be made.

.IP \fBPASSWORD\fR
Password for the specified \fBUSER\fR.

.SH OPTIONS

.IP \fB-b\fR
Run isql in non-interactive batch mode. In this mode, the isql processes its
standard input, expecting one SQL command per line.

.IP \fB-d\fIDELIMITER\fR
Delimits columns with \fIdelimiter\fR.

.IP \fB-x\fIHEX\fR
Delimits columns with \fIHEX\fR, which is a hexadecimal code of the delimiting
character in the format 0xNN - i.e. 0x09 for the TAB character.

.IP \fB-w\fR
Format the result as HTML table.

.IP \fB-c\fR
Output the names of the columns on the first row. Has any effect only with the
\fB-d\fR or \fB-x\fR options.

.IP \fB-m\fINUM\fR
Limit the column display width to \fINUM\fR characters.

.IP \fB-l\fILOCALE\fR
Sets locale to \fILOCALE\fR.

.IP \fB-q\fR
Wrap the character fields in double quotes.

.IP \fB-3\fR
Use the ODBC 3 calls.

.IP \fB-n\fR
Use the new line processing. (multiple lines of SQL, terminated with command GO).

.IP \fB-e\fR
Use the SQLExecDirect instead of Prepare.

.IP \fB-k\fR
Use SQLDriverConnect.

.IP \fB-v\fR
Turn on the verbose mode, where the errors are fully described. Useful for debugging.

.IP \fB--version\fR
Prints the program version and exits.

.IP \fB-L\fINUM\fR
Alter the maximum number of characters displayed from a character field to \fINUM\fR characters. Default is 300.

.SH COMMANDS
This section briefly describes some isql runtime commands.

.B help
.RS
List all tables in the database.
.RE

.B help \fItable\fR
.RS
List all columns in the \fItable\fR.
.RE

.B help help
.RS
List all help options.
.RE

.SH EXAMPLES
.nf
$ isql WebDB MyID MyPWD -w -b < My.sql
.fi

Connects to the WebDB as user MyID with password MyPWD, then execute the
commands in the My.sql file and returns the results wrapped in HTML table.
Each line in My.sql must contain exactly 1 SQL command, except for the last
line, which must be blank (unless the \fB-n\fR option is specified).

.SH FILES

.I /etc/odbc.ini
.RS
System-wide DSN definitions. See
.BR odbc.ini (5)
for details.
.RE

.I $HOME/.odbc.ini
.RS
User-specific DSN definitions. See
.BR odbc.ini (5)
for details.
.RE

.SH SEE ALSO
.BR odbcinst (1),
.BR odbc.ini (5)

.SH AUTHORS

The authors of unixODBC are Peter Harvey <\fIpharvey@codebydesign.com\fR> and
Nick Gorham <\fInick@lurcher.org\fR>. For the full list of contributors see the
AUTHORS file.

.SH COPYRIGHT

unixODBC is licensed under the GNU Lesser General Public License. For details
about the license, see the COPYING file.