LinuxCommandLibrary

isql

TLDR

Connect to data source

$ isql [dsn_name]
copy
Connect with credentials
$ isql [dsn_name] [username] [password]
copy
Execute query from file
$ isql [dsn] -i [query.sql]
copy
Output to file
$ isql [dsn] < [query.sql] > [output.txt]
copy
Verbose mode
$ isql -v [dsn]
copy
No header output
$ isql -b [dsn]
copy

SYNOPSIS

isql [options] dsn [user] [password]

DESCRIPTION

isql is an ODBC command-line SQL client. It connects to any database with an ODBC driver.
The tool executes SQL queries interactively or from files. It provides database-agnostic access through ODBC.
isql is an ODBC SQL client.

PARAMETERS

DSN

Data source name from odbc.ini.
USER
Database username.
PASSWORD
Database password.
-v
Verbose mode.
-b
Batch mode (no headers).
-d DELIM
Column delimiter.
-i FILE
Input file.
--help
Display help information.

CAVEATS

Requires ODBC drivers. DSN must be configured. Part of unixODBC.

HISTORY

isql is part of unixODBC, providing command-line database access through the Open Database Connectivity standard.

SEE ALSO

odbcinst(1), psql(1), mysql(1), sqlcmd(1)

Copied to clipboard