|
|
caac36 |
\" vim:language en_US.UTF-8:
|
|
|
caac36 |
.TH isql 1 "Tue 25 Jun 2013" "version 2.3.1" "UnixODBC manual pages"
|
|
|
caac36 |
|
|
|
caac36 |
.SH NAME
|
|
|
caac36 |
isql - unixODBC command-line interactive SQL tool
|
|
|
caac36 |
|
|
|
caac36 |
.SH SYNOPSIS
|
|
|
caac36 |
\fBisql\fR \fIDSN\fR [\fIUSER\fR [\fIPASSWORD\fR]] [\fIoptions\fR]
|
|
|
caac36 |
|
|
|
caac36 |
.SH DESCRIPTION
|
|
|
caac36 |
.B isql
|
|
|
caac36 |
is a command line tool which allows the user to execute SQL in batch
|
|
|
caac36 |
or interactively. It has some interesting options such as an option to generate
|
|
|
caac36 |
output wrapped in an HTML table.
|
|
|
caac36 |
|
|
|
caac36 |
.SH ARGUMENTS
|
|
|
caac36 |
|
|
|
caac36 |
.IP \fBDSN\fR
|
|
|
caac36 |
The Data Source Name, which should be used to make connection to the database.
|
|
|
caac36 |
The data source is looked for in the /etc/odbc.ini and $HOME/.odbc.ini files in
|
|
|
caac36 |
that order, with the latter overwriting the former.
|
|
|
caac36 |
|
|
|
caac36 |
.IP \fBUSER\fR
|
|
|
caac36 |
Specifies the database user/role under which the connection should be made.
|
|
|
caac36 |
|
|
|
caac36 |
.IP \fBPASSWORD\fR
|
|
|
caac36 |
Password for the specified \fBUSER\fR.
|
|
|
caac36 |
|
|
|
caac36 |
.SH OPTIONS
|
|
|
caac36 |
|
|
|
caac36 |
.IP \fB-b\fR
|
|
|
caac36 |
Run isql in non-interactive batch mode. In this mode, the isql processes its
|
|
|
caac36 |
standard input, expecting one SQL command per line.
|
|
|
caac36 |
|
|
|
caac36 |
.IP \fB-d\fIDELIMITER\fR
|
|
|
caac36 |
Delimits columns with \fIdelimiter\fR.
|
|
|
caac36 |
|
|
|
caac36 |
.IP \fB-x\fIHEX\fR
|
|
|
caac36 |
Delimits columns with \fIHEX\fR, which is a hexadecimal code of the delimiting
|
|
|
caac36 |
character in the format 0xNN - i.e. 0x09 for the TAB character.
|
|
|
caac36 |
|
|
|
caac36 |
.IP \fB-w\fR
|
|
|
caac36 |
Format the result as HTML table.
|
|
|
caac36 |
|
|
|
caac36 |
.IP \fB-c\fR
|
|
|
caac36 |
Output the names of the columns on the first row. Has any effect only with the
|
|
|
caac36 |
\fB-d\fR or \fB-x\fR options.
|
|
|
caac36 |
|
|
|
caac36 |
.IP \fB-m\fINUM\fR
|
|
|
caac36 |
Limit the column display width to \fINUM\fR characters.
|
|
|
caac36 |
|
|
|
caac36 |
.IP \fB-l\fILOCALE\fR
|
|
|
caac36 |
Sets locale to \fILOCALE\fR.
|
|
|
caac36 |
|
|
|
caac36 |
.IP \fB-q\fR
|
|
|
caac36 |
Wrap the character fields in double quotes.
|
|
|
caac36 |
|
|
|
caac36 |
.IP \fB-3\fR
|
|
|
caac36 |
Use the ODBC 3 calls.
|
|
|
caac36 |
|
|
|
caac36 |
.IP \fB-n\fR
|
|
|
caac36 |
Use the newline processing.
|
|
|
caac36 |
|
|
|
caac36 |
.IP \fB-e\fR
|
|
|
caac36 |
Use the SQLExecDirect instead of Prepare.
|
|
|
caac36 |
|
|
|
caac36 |
.IP \fB-k\fR
|
|
|
caac36 |
Use SQLDriverConnect.
|
|
|
caac36 |
|
|
|
caac36 |
.IP \fB-v\fR
|
|
|
caac36 |
Turn on the verbose mode, where the errors are fully described. Useful for debugging.
|
|
|
caac36 |
|
|
|
caac36 |
.IP \fB--version\fR
|
|
|
caac36 |
Prints the program version and exits.
|
|
|
caac36 |
|
|
|
caac36 |
.SH COMMANDS
|
|
|
caac36 |
This section briefly describes some isql runtime commands.
|
|
|
caac36 |
|
|
|
caac36 |
.B help
|
|
|
caac36 |
.RS
|
|
|
caac36 |
List all tables in the database.
|
|
|
caac36 |
.RE
|
|
|
caac36 |
|
|
|
caac36 |
.B help \fItable\fR
|
|
|
caac36 |
.RS
|
|
|
caac36 |
List all columns in the \fItable\fR.
|
|
|
caac36 |
.RE
|
|
|
caac36 |
|
|
|
caac36 |
.B help help
|
|
|
caac36 |
.RS
|
|
|
caac36 |
List all help options.
|
|
|
caac36 |
.RE
|
|
|
caac36 |
|
|
|
caac36 |
.SH EXAMPLES
|
|
|
caac36 |
.nf
|
|
|
caac36 |
$ isql WebDB MyID MyPWD -w -b < My.sql
|
|
|
caac36 |
.fi
|
|
|
caac36 |
|
|
|
caac36 |
Connects to the WebDB as user MyID with password MyPWD, then execute the
|
|
|
caac36 |
commands in the My.sql file and returns the results wrapped in HTML table.
|
|
|
caac36 |
Each line in My.sql must contain exactly 1 SQL command, except for the last
|
|
|
caac36 |
line, which must be blank (unless the \fB-n\fR option is specified).
|
|
|
caac36 |
|
|
|
caac36 |
.SH FILES
|
|
|
caac36 |
|
|
|
caac36 |
.I /etc/odbc.ini
|
|
|
caac36 |
.RS
|
|
|
caac36 |
System-wide DSN definitions. See
|
|
|
caac36 |
.BR odbc.ini (5)
|
|
|
caac36 |
for details.
|
|
|
caac36 |
.RE
|
|
|
caac36 |
|
|
|
caac36 |
.I $HOME/.odbc.ini
|
|
|
caac36 |
.RS
|
|
|
caac36 |
User-specific DSN definitions. See
|
|
|
caac36 |
.BR odbc.ini (5)
|
|
|
caac36 |
for details.
|
|
|
caac36 |
.RE
|
|
|
caac36 |
|
|
|
caac36 |
.SH SEE ALSO
|
|
|
caac36 |
.BR odbcinst (1),
|
|
|
caac36 |
.BR odbc.ini (5)
|
|
|
caac36 |
|
|
|
caac36 |
.SH AUTHORS
|
|
|
caac36 |
|
|
|
caac36 |
The authors of unixODBC are Peter Harvey <\fIpharvey@codebydesign.com\fR> and
|
|
|
caac36 |
Nick Gorham <\fInick@easysoft.com\fR>. For the full list of contributors see the
|
|
|
caac36 |
AUTHORS file.
|
|
|
caac36 |
|
|
|
caac36 |
.SH COPYRIGHT
|
|
|
caac36 |
|
|
|
caac36 |
unixODBC is licensed under the GNU Lesser General Public License. For details
|
|
|
caac36 |
about the license, see the COPYING file.
|