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.
specifies an alternative column separator. By default, db uses the tab character as the column separator.
specifies a data source name to connect to. If this option is not specified, db brings up a dialog prompting you for connection information.
exits immediately on error. Normally db continues to process SQL queries even after an error has occurred.
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.
displays additional information about the data source name.
lists the available data source names.
does not buffer output.
specifies a password used to connect to the data source name specified via the
-doption. If this option is not specified, db prompts you for a password. -t
displays the names of all tables in the database.
specifies the number of seconds that db has to complete the operation before timing out and issuing an error.
specifies a user name used to connect to the data source name specified with the
Possible exit status values are:
Windows Server 2012. Windows 8.1. Windows Server 2012 R2. Windows 10. Windows Server 2016. Windows Server 2019.
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.
To use db, you must have the ODBC 2.0 Driver Manager (or later) installed.
PTC MKS Toolkit for System Administrators
PTC MKS Toolkit for Developers
PTC MKS Toolkit for Interoperability
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition
PTC MKS Toolkit 10.3 Documentation Build 39.