SYNOPSIS
db [
db
[
DESCRIPTION
The db command sends Structured Query Language (SQL) queries to a database via the Open Database Connectivity (ODBC) interface. db reads SQL queries from the command line or from a file, and writes the results to standard output.
Options
-c column-sep-
specifies an alternative column separator. By default, db uses the tab character as the column separator.
-d dsn-
specifies a data source name to connect to. If this option is not specified, db brings up a dialog prompting you for connection information.
-e -
exits immediately on error. Normally db continues to process SQL queries even after an error has occurred.
-f query-file-
specifies a file to read SQL queries from. If this option is not specified, and no queries are specified on the command line, db reads queries from standard input.
-i -
displays additional information about the data source name.
-l -
lists the available data source names.
-n -
does not buffer output.
-p password-
specifies a password used to connect to the data source name specified via the
-d option. If this option is not specified, db prompts you for a password. -t -
displays the names of all tables in the database.
-timeout seconds-
specifies the number of seconds that db has to complete the operation before timing out and issuing an error.
-u username-
specifies a user name used to connect to the data source name specified with the
-d option.
DIAGNOSTICS
Possible exit status values are:
PORTABILITY
Windows 2000. Windows XP. Windows Server 2003. Windows Vista.
LIMITS
The maximum length for a SQL command (read from either a file or the command line) is 8192 characters.
The maximum amount of data which db can extract from a column is 256 characters, which corresponds to a SQL char255 field.
NOTES
To use db, you must have the ODBC 2.0 Driver Manager (or later) installed.
AVAILABILITY
MKS Toolkit for System Administrators
MKS Toolkit for Developers
MKS Toolkit for Interoperability
MKS Toolkit for Professional Developers
MKS Toolkit for Enterprise Developers
MKS Toolkit for Enterprise Developers 64-Bit Edition
MKS Toolkit 9.2 Documentation Build 16.