Command Line SQL Statement Execution Tool Overview

Should I order a business license of the tool?
Yes, if you:
  • need professional technical support
  • use more than 5 copies of the tool in your company
  • want to install the tool in a bulk manner automatically

Order Business License

DTM ODBC SQL runner icon

DTM ODBC SQL runner is a command line tool that allows the user to run SQL statements using specified ODBC data source (DSN). It is most suitable for batch and scheduled execution. It is a Windows application that supports Windows XP/Vista/7, Windows 8/10 (desktop), Server 2003/2008/2012.

Download 32 bit and 64 bit. No installation is required.

Usage

sqlrun [optional parameters] [space-delimited file names]

Parameters

-I[<configuration file name>]
DTM ODBC SQL runner sample output

-H
(add column header to output file).

-Q
(shows actual parameters loaded from configuration file or assigned by command line switches).

-D<ODBC Data Source Name>

-U<user name>

-P<password>

-O<standard output file name>     (the tool uses terminal output by default)

-L<log file name>     (the tool uses terminal output by default)

-S<SQL script file name>

-T<immediate SQL statement specification>

Important: command line parameter overwrites configuration file value.

Configuration File Format

[Connection]
DSN=<data source name>
User=<user name>
Password=<password>

[Settings]
Output=<standard output file name>
Errors=<uses terminal output by default>
Header=<0|1>
Delimiter=<"tab" can be specified as '\t'. No delimiter means "fixed width" output.>
OverwriteOutput=<0|1> for 'append' or 'overwrite' output file
OverwriteLog=<0|1> for 'append' or 'overwrite' log file
NullIsEmptyString=<0|1> The program uses empty string instead of NULL if the option is '1' or 'true'
QuoteChar=<symbol for unconditional value quoting, empty (no quote) by default>

[Script]
File=<files specification>
or
Statement=<immediate SQL statement specification>