This topic describes parameters of Database Tour command line, specific to exporting or importing data. This type of command line can be used only in Database Tour Pro.

More detailed information about specific export options can be found here.

Common rules for writing command lines are described here.

Building Command Line in a Few Clicks

Usage

Command line options and their descriptions

Examples

Building Command Line in a Few Clicks

Advanced users can build the needed command line manually using the specification below.

But if you are a beginner or need to create a command line or action file without learning the details, use the Database Tour Command Line Builder.

Usage

Classic command line format

The command line consists of all needed switches and parameters:

dbtour.exe /Parameter1 /Parameter2 /... /ParameterN

Short command line format

This format is more flexible as it allows you to keep all command line parameters in a separate action file. The command line consists of the /ActionFile parameter (which points to the action file path) and an optional /silent parameter:

dbtour.exe [/silent] /ActionFile=ActionFileName

Command line options and their descriptions

/export | /copy

Tells the application either to export data to file or database or to copy data to clipboard. Required parameter for this command line type.

/silent

This switch will run the application in 'silent' mode, without any windows (except purchase reminder when the application is used without registration after the end of the test period). When using /ActionFile option, /silent switch must be outside parameters file. Attention! There are no overwrite or other prompts in this mode.

/ActionFile=Value

Specifies the name of the action file, which contains command line parameters, one parameter per line. Lines with a semicolon at the beginning are ignored as comments. Blank lines are allowed. When using this option, there should not be other command line parameters in the command line except /silent switch. If the file name includes spaces, entire parameter must be enclosed in quotes. See example 12.

/UseParadoxPasswords=Value

Semicolon separated list of passwords for Paradox tables (if password protected Paradox tables will be used during the process). Can be used only with /SrcDBInterface=BDE option.

/SrcDB=Value

Specifies the name of the source database. Can be a file name, folder name, ODBC DSN, or connection string. If the name includes spaces, entire parameter must be enclosed in quotes.

This parameter can be omitted if /SrcDBInterface=FD parameter is used and other command line parameters fully describe the source database.

/SrcDBInterface=Value

Specifies database interface (database engine) used to connect the source database. Possible values: ADO, FD, INTERBASE, BDE. Default value: ADO.

/SrcDBKind=Value

Specifies source database kind. Possible values: FOLDER, FILE, DSN, CONSTR; the last one must be used only for ADO interface (see /SrcDBInterface description). If not specified, the application will try to detect it automatically.

Instead of using this parameter, it is possible to use a prefix specifying the database kind (file, folder, ODBC DSN, connection string) in the /SrcDB parameter. The prefix must be enclosed in arrow brackets <>. Possible values: <FILE>, <FOLDER>, <DSN>, <CONSTR>. It is recommended to enclose the entire parameter in quotes in such cases. See example 11.

/SrcDBDriver=Value

Specifies source database driver (i.e. database type). Examples of possible values: ACCESS, DBASE, INTERBASE, FIREBIRD, ORACLE, SQL SERVER, etc. If not specified, the application will try to detect it automatically. If the driver name includes spaces, entire parameter must be enclosed in quotes.

/SrcDBUserName=Value

Specifies user name for source database. If the user name includes spaces, entire parameter must be enclosed in quotes.

/SrcDBPassword=Value

Specifies password for source database. If the password includes spaces, entire parameter must be enclosed in quotes.

/SrcServer=Value

Specifies the server address of source database for DB2, SQL Server, Advantage, Informix, Interbase, Firebird, MySQL, PostgreSQL, SQL Anywhere databases. Can be used only with /SrcDBInterface=FD option.

/SrcPort=Value

The TCP/IP port of source database on which the DB2, Advantage, PostgreSQL, MySQL, Interbase, or Firebird database server is listening. Can be used only with /SrcDBInterface=FD option.

/SrcProtocol=Value

Specifies the protocol used to connect to the source database of type DB2, Firebird, or Interbase. Can be used only with /SrcDBInterface=FD option.

/SrcOSAuthentication

Tells the application to use OS authentication instead of database authentication for the source database. Can be used only with /SrcDBInterface=FD option.

/SrcAuthenticationMode=Value

Specifies authentication mode for the source database of type Oracle. Possible values: Normal, SysDBA, SysOper, etc. Read Oracle documentation for more information. Can be used only with /SrcDBInterface=FD option.

/SrcVendorLibrary=Value

Path to the client library of the database vendor for the source database. Can be used only with /SrcDBInterface=FD option.

/SrcVendorHomepath=Value

Path to the client home directory of the database vendor for the source database. Can be used only with /SrcDBInterface=FD option.

/SrcSystemDB=Value

Specifies the path to the system database file for the source Access database. Can be used only with /SrcDBInterface=FD option.

/SrcStringFormat=Value

Specifies the string format for the source Access or SQLite database. Possible values: Choose, Unicode, ANSI. Can be used only with /SrcDBInterface=FD option.

/SrcCharset=Value

Specifies the character set for the source database of type Oracle, PostgreSQL, Informix, MySQL, Interbase, Firebird. Example: UTF8. Can be used only with /SrcDBInterface=FD option.

/SrcSharedCache=Value

Specifies either to use shared cache for the source SQLite database. Possible values: False, True. Can be used only with /SrcDBInterface=FD option.

/SrcBlockingMode=Value

Specifies the blocking mode for the source SQLite database. Possible values: Exclusive, Normal. Can be used only with /SrcDBInterface=FD option.

/SrcReadOnly

Tells the application to open the source Access database in read-only mode. Can be used only with /SrcDBInterface=FD option.

/SrcTableName=Value

Specifies a source table name to open. If this parameter is omitted and the source database is file, the application will try to extract it from /SrcDB. If the name includes spaces, entire parameter must be enclosed in quotes. This parameter cannot be used together with /SrcSQLFile parameter.

It can be a file (table) mask or file (table) list instead of a file (table) name to force the application to open and export group of files (tables) consequently. In this case, /TrgTableName must be empty or contain the corresponding mask or list, with one exception: if target format is DATABASE and export mode is APPEND, /TrgTableName can contain only one table (in this case all source table should have compatible field structure). This extended syntax is applicable only if /export option is used. A <MASK> prefix should be used for masks and a <LIST> prefix should be used for lists (entire parameter must be enclosed in quotes in this case). Lists must be semicolon separated. See examples.

/SrcSQLFile=Value

Specifies a file name with SQL query to open. The file can also be a multi-statement SQL script; in this case the application will execute all statements consequently; the query, which result should be exported, must be the last SQL statement in the file; different statements must be separated by /SQLStatementSeparator. If the name includes spaces, entire parameter must be enclosed in quotes. This parameter cannot be used together with /SrcTableName parameter.

/SQLStatementSeparator=Value

Specifies separator of SQL statements (SQL terminator) if /SrcSQLFile is a multi-statement SQL script. Can be any character or character code, which follows # symbol. There are also predefined separators:
sqlplus, which is usually used in Oracle SQL Plus utility and other Oracle specific tools and utilities; this is a slash (/) on a separate line between two statements;
mssqlgo, which is usually used in SQL Server tools; this is a GO word on a separate line between two statements.
Default value: semicolon (;).

/SQLParamNames=Value

Can be used in cases, when /SrcSQLFile contains a parameterized SQL query (or queries). SQL text of parameterized query contains parameter(s) for dynamic replacement; each parameter starts with colon, for example, :ITEMID, :PAYDATE and so on. SQL parameters are processed on database engine or database (for server databases) level. Use this switch to define a list of parameter names, which should be automatically replaced before the query execution. This list must contain parameter names (the colon must be omitted here) separated by %#% character combination. If the switch contains spaces, it should be enclosed in quotes. This switch must be used in conjunction with /SQLParamValues and /SQLParamTypes switches. See examples.

/SQLParamValues=Value

List of SQL parameter values separated by %#% character combination. The number of items in the list and their positions must match the ones from /SQLParamNames switch. To pass null value, text of the value should be NULL (in upper case). If the switch contains spaces, it should be enclosed in quotes.

/SQLParamTypes=Value

List of SQL parameter types separated by %#% character combination. The number of items in the list and their positions must match the ones from /SQLParamNames switch. Available types: Boolean, Currency, Date, DateTime, Float, Integer, SmallInt, String, Time, Word. The switch should not contain spaces.

/SQLMacroNames=Value

Can be used in cases, when /SrcSQLFile contains an SQL query (or queries) with macros. SQL text of such queries contains macro(s) for dynamic replacement; each macro starts with << and ends with >>, for example, <<ITEMID>>, <<PAYDATE>> and so on; unlike parameter, macro does not have a type and is always inserted as text. Use this switch to define a list of macro names, which should be automatically replaced before the query execution. This list must contain macro names (separators << and >> must be omitted here; macro name should contain only alphanumeric characters) separated by %#% character combination. The macros are processed before processing of parameters; therefore it is possible to use macros inside parameters. If the switch contains spaces, it should be enclosed in quotes. This switch must be used in conjunction with /SQLMacroValues switch. See examples.

/SQLMacroValues=Value

List of SQL macro values separated by %#% character combination. The number of items in the list and their positions must match the ones from /SQLMacroNames switch. If the switch contains spaces, it should be enclosed in quotes.

/FetchSize=Value

For datasets, specifies the count of records to fetch at a single fetch operation. It can affect the export speed, especially when /SrcTableName option is used. If this parameter is omitted or set to 0, the default value of 50 is used. This option works in conjunction with /SrcDBInterface=FD option.

/filter=Value

Filter condition, which must be applied to database after its opening. It should not be used with /SrcSQLFile parameter; to filter SQL query results, use WHERE section of SQL query instead. Filter condition that includes spaces, greater-than sign, or less-than sign, must be enclosed in quotes. See example 5.

/FilterSensitive

Specifies that the literal strings in the filter condition for source database are compared to string-valued fields case-sensitively. Can be used only with /filter option. Does not work for ADO connections.

/FilterPartial

Specifies that the strings in filter condition for source database that end in an asterisk signify a partial string match with the asterisk matching any number of characters. Can be used only with /filter option. Does not work for ADO connections.

/sort=Value

List of fields (or relative positions of the fields), by which the source database should be sorted. It should not be used with /SrcSQLFile parameter; to sort SQL query results, use ORDER BY section of SQL query instead. Field names (positions) must be separated by commas. If the list contains spaces, entire parameter must be enclosed in quotes (see example 3). ASC and DESC modifiers can be used. For example, using the switch from example 3 will cause sorting by two fields: by payername (in ascending order) first and then by paymentsum (in descending order).

The following options meaningful only if /export option is used:

/TrgDB=Value

Specifies the name of the target file or database. This can be a file name, folder name, ODBC DSN, or connection string. If the name includes spaces, entire parameter must be enclosed in quotes.

This parameter can be omitted if /TrgDBInterface=FD parameter is used and other command line parameters fully describe the target database.

/TrgDBInterface=Value

Specifies database interface (database engine) used to connect the target database for DATABASE export format. Possible values: ADO, FD, INTERBASE, BDE. Default value: ADO.

/TrgDBKind=Value

Specifies target database kind for DATABASE export format. Possible values: FOLDER, FILE, DSN, CONSTR; the last one must be used only for ADO interface (see /TrgDBInterface description). If not specified, the application will try to detect it automatically.

Instead of using this parameter, it is possible to use a prefix specifying the database kind (file, folder, ODBC DSN, connection string) in the TrgDB parameter. The prefix must be enclosed in arrow brackets <>. Possible values: <FILE>, <FOLDER>, <DSN>, <CONSTR>. It is recommended to enclose the entire parameter in quotes in such cases. See example 11.

/TrgDBDriver=Value

Specifies target database driver for DATABASE export format. Examples of possible values: ACCESS, DBASE, INTERBASE, FIREBIRD, ORACLE, SQL SERVER, etc. If not specified, the application will try to detect it automatically. If the driver name includes spaces, entire parameter must be enclosed in quotes.

/TrgDBUserName=Value

Specifies user name to connect target database for DATABASE export format. If the user name includes spaces, entire parameter must be enclosed in quotes.

/TrgDBPassword=Value

Specifies password to connect target database for DATABASE export format. If the password includes spaces, entire parameter must be enclosed in quotes.

/TrgServer=Value

Specifies the server address of target database for DATABASE export format for DB2, SQL Server, Advantage, Informix, Interbase, Firebird, MySQL, PostgreSQL, SQL Anywhere databases. Can be used only with /TrgDBInterface=FD option.

/TrgPort=Value

The TCP/IP port of target database on which the DB2, Advantage, PostgreSQL, MySQL, Interbase, or Firebird database server is listening for DATABASE export format. Can be used only with /TrgDBInterface=FD option.

/TrgProtocol=Value

Specifies the protocol used to connect to the target database of type DB2, Firebird, or Interbase for DATABASE export format. Can be used only with /TrgDBInterface=FD option.

/TrgOSAuthentication

Tells the application to use OS authentication instead of database authentication for the target database for DATABASE export format. Can be used only with /TrgDBInterface=FD option.

/TrgAuthenticationMode=Value

Specifies authentication mode for the target database of type Oracle for DATABASE export format. Possible values: Normal, SysDBA, SysOper, etc. Read Oracle documentation for more information. Can be used only with /TrgDBInterface=FD option.

/TrgVendorLibrary=Value

Path to the client library of the database vendor for the target database for DATABASE export format. Can be used only with /TrgDBInterface=FD option.

/TrgVendorHomepath=Value

Path to the client home directory of the database vendor for the target database for DATABASE export format. Can be used only with /TrgDBInterface=FD option.

/TrgSystemDB=Value

Specifies the path to the system database file for the target Access database for DATABASE export format. Can be used only with /TrgDBInterface=FD option.

/TrgStringFormat=Value

Specifies the string format for the target Access or SQLite database. Possible values: Choose, Unicode, ANSI. Can be used only with /TrgDBInterface=FD option.

/TrgCharset=Value

Specifies the character set for the target database of type Oracle, PostgreSQL, Informix, MySQL, Interbase, Firebird. Example: UTF8. Can be used only with /TrgDBInterface=FD option.

/TrgSharedCache=Value

Specifies either to use shared cache for the target SQLite database. Possible values: False, True. Can be used only with /TrgDBInterface=FD option.

/TrgBlockingMode=Value

Specifies the blocking mode for the target SQLite database. Possible values: Exclusive, Normal. Can be used only with /TrgDBInterface=FD option.

/TrgTableName=Value

Specifies target table name for DATABASE export format. If this parameter is omitted and the target is file, the application will try to extract it from TrgDB. If the name includes spaces, entire parameter must be enclosed in quotes.

It can be a file (table) mask or file (table) list instead of a file (table) name for multi-table exporting. In this case, /SrcTableName must contain the corresponding mask or list. A <MASK> prefix should be used for masks and a <LIST> prefix should be used for lists (entire parameter must be enclosed in quotes in this case). Lists must be semicolon separated. See examples.

/TrgTableDescription=Value

Specifies the target table description for DATABASE and SQL export formats. Currently, the description can be applied to Oracle, SQL Server, PostgreSQL, and MySQL databases. For DATABASE target format, the description is applied only to table, which is created during the export operation. For SQL target format, the description is applied only with /AddDDL switch. If you specify <copy_from_source> as a value, the application will try to use description of the source table (if any), but it requires more time to process. If the value includes spaces, entire parameter must be enclosed in quotes.

/ExportMode=Value

Specifies export mode. Possible values:

CREATE+INSERT

Target is created and filled with incoming rows; if target already exists, export fails.

REPLACE+INSERT

Target is created and filled with incoming rows; if target already exists, it is overwritten.

CREATE_OR_REPLACE

Blank target (using appropriate structure) is created; if target already exists, it is overwritten.

APPEND

Target is appended with incoming rows; if target does not exists, it is created.

Notes
- This mode can be used only when target format is TEXT, HTML, XML (where XML schema is 'standard' or 'simple'), SQL, or DATABASE.
- The field structure of the source must be compatible with existing target structure.

EMPTY+INSERT

Target is emptied before inserting incoming rows; if target does not exists, it is created.

Notes
- This mode can be used only when target format is DATABASE.
- The field structure of the source must be compatible with existing target structure.

UPDATE

The records in the target that match incoming records, are replaced with incoming records.
/KeyFields are used to match records.

Notes
- This mode can be used only when target format is DATABASE.
- The target must already exist and should have an index defined to match the records.
- The field structure of the source must be compatible with existing target structure.
- The fields in target, used to match the records (key fields of target), are not updated.
- Use this mode carefully when the key fields can contain NULL values.
- Use this mode carefully for multi-table exporting.
- This mode may work differently for different target database types/interfaces, therefore it is recommended to test it carefully (consider to use /MemorySaving option) before using on production systems.

APPEND+UPDATE

The records in the target that match incoming records, are replaced with incoming records. Unmatched incoming records are appended to the target.
/KeyFields are used to match records.

Notes
- This mode can be used only when target format is DATABASE.
- The target must already exist and should have an index defined to match the records.
- The field structure of the source must be compatible with existing target structure.
- Use this mode carefully when the key fields (either source or target) can contain NULL values.
- Use this mode carefully for multi-table exporting.
- This mode may work differently for different target database types/interfaces, therefore it is recommended to test it carefully (consider to use /MemorySaving option) before using on production systems.

DELETE

The records in the target that match incoming records, are deleted.
/KeyFields are used to match records.

Notes
- This mode can be used only when target format is DATABASE.
- The target must already exist and should have an index defined to match the records.
- Use this mode carefully when the key fields can contain NULL values.
- Use this mode carefully for multi-table exporting.
- This mode may work differently for different target database types/interfaces, therefore it is recommended to test it carefully (consider to use /MemorySaving option) before using on production systems.

If not specified, CREATE+INSERT is used.

/OpenTarget

Forces the application to open target file or table after successful export execution.

In multi-table exporting, it works differently depending on the target type:

  • when exporting to HTML, and /CreateIndexFile option is used, the index.html file (it contains hyperlinks to all exported files) is opened;
  • when exporting to a server or multi-table file database, the last table is opened;
  • for other cases, each exported file is opened.

/CreateTargetContainer

Forces the application to create the target container if it does not exist. The target container is a folder or a multi-table database to which the data is exported. A possibility to create a multi-table database is limited to Microsoft Access (.mdb), SQLLite, Firebird, and Interbase databases.

/dbfVersion=Value

Specifies version (level) for DBF target format. Possible values: 3, 4, 5. Default value: 3.

/CommitInterval=Value

Specifies commit interval (commit frequency) in records for DATABASE and SQL export formats. Default value: 0 (COMMIT is done in the end).

/MemorySaving

Enables memory saving mode for DATABASE export format. The memory saving mode may be useful when the source or target tables have very large number of records, especially if target interface is ADO. In addition to memory saving, the improvements in performance may be achieved. Note: This mode may work differently for different target database types/interfaces, therefore it is recommended to test it carefully before using on production environment.

/UseSQLParameters

Enables using SQL parameters in memory saving mode for DATABASE export format. Using parameterized SQL queries can significantly speed up the process and allows to export BLOB data for some database types/interfaces.

/UseBatchMode

Enables batch export mode for DATABASE export format (FD connections only). Batch mode reduces the target database workload and increases the speed of export drastically. The size of a batch equals to /CommitInterval. Note: The record level logging may work differently in this mode.

/SuppressOverwriteOrDeletePrompt

Suppresses file/table overwrite prompt for REPLACE+INSERT and CREATE_OR_REPLACE export mode or table emptying prompt for EMPTY+INSERT export mode. This option is ignored in 'silent' mode, where such prompts are always suppressed.

The following options meaningful only if /export or /copy options are used:

/ExportType=Value

Specifies the target format. Possible values:

TEXT export to text file (delimited or fixed-length)
JSON export to file in JSON format
HTML export to HTML document
XML export to XML document
RTF export to RTF file
PDF export to PDF file (binary file)
EXCEL export to Excel 97-2003 workbook (binary file)
EXCELXLSX export to Excel 2007+ workbook (XLSX)
EXCELXML export to Excel workbook (XML-based)
EXCELOLE export to Excel workbook using OLE (binary file)
WORDOLE export to Word document using OLE (binary file)
SYLK export to SYLK file
DBF export to dBase table (binary file)
SQL export to SQL Script file
DATABASE export to relational database of any type
CUSTOM export to file with user defined format

If this parameter is omitted or erroneous, the application tries to define it from /TrgDB. TEXT format is used by default. DBF, EXCEL, PDF, and DATABASE target formats should not be used with /copy option due to their binary nature.

/CloseWhenDone

Forces the application to close itself after successful query execution. This option is ignored in 'silent' mode where the application is closed automatically anyway.

/CloseOnError

Forces the application to close itself when error occurs during the command line execution. This option is ignored in 'silent' mode where the application is closed automatically anyway.

/minimize

Application starts in minimized mode. It is restored to normal mode on error or after ending execution (if /CloseWhenDone switch is not used). This option is ignored in 'silent' mode where the application runs without any windows.

/IncludeImages

Specifies either to include graphic data when exporting. Meaningful only for HTML, EXCELXLSX, RTF, or PDF target formats. Note: Using this option can slow down the exporting process.

/IncludeMemo

Specifies either to include contents of MEMO/CLOB (large text) fields when exporting. Without this switch, a constant describing the field type will be used instead of the field contents. Ignored for DBF and DATABASE target formats.

/IncludeColNames

Specifies either to include field (column) names when exporting. Ignored for DBF and DATABASE target formats.

/FixedFieldLength

Specifies that fields in output file have fixed length (without special separators) for TEXT target format. In fixed-length files, field data, which shorter than field width, is completed by spaces. Cannot be used together with /separator option.

/separator=Value

Specifies the field separator for TEXT target format. Can be any character or character code, followed after # symbol. For example, if you wish to specify a TAB character as the field separator, then /separator=#9 option must be used. If not specified, TAB character is used. This option cannot be used together with /FixedFieldLength switch.

/QuoteChar=Value

Specifies the quote character for TEXT target format. The quote character is placed around field data if the field data contains embedded field separator(s) or quote character(s), and when more than one field is exported. Embedded quote character is represented by a pair of consecutive quote characters. It can be any character or character code, followed after # symbol. For example, if you wish to specify an apostrophe as the quote character, then /QuoteChar=#39 option must be used. If not specified, double quotes are used. This option cannot be used together with /FixedFieldLength switch.

/QuoteAllFields

Forces quoting all fields in target for TEXT target format when more than one field is exported. This option is ignored for fixed-length files.

/TextExpression=Value

Specifies the expression for CUSTOM target format.

/TextSchema=Value

Specifies the schema for TEXT target format. Possible values:

standard or 0
ado or 1
bde or 2

Default value: standard (0).

/xmlSchema=Value

Specifies the schema for XML target format. Possible values:

ado or 0 (only for databases, opened by ADO)
standard or 1
simple or 2
xsl or 3

Default value: standard (1).

/xmlUseCDataAttr

Forces the application to use CDATA attribute in text data for XML target format (for simple schema only).

/QuoteAllFields

Forces the application to quote all fields in target for TEXT target format. If this parameter is omitted, the quotation is done only for text fields where the value contains the field separator(s) or quoting character(s) (in latter case, each quoting character inside the value will be doubled). This option is ignored for fixed-length files.

/TrimTrailingSpaces

Specifies either to trim trailing spaces and control characters in target or not. Applicable for char and varchar data only. Using this option allows to remove useless data and thus reduce the output volume, improve the target look for some destination formats etc.

/CreateIndexFile

Specifies either to create a separate index file for multi-table export for HTML target format. If this parameter is omitted, the index file will not be created.

/AppendAsTable

Specifies how to process Append export mode for HTML target format. With this switch, if Append export mode is used, the new data will be appended as a separate HTML table in the end of existing target file. If this parameter is omitted, the appending is done to the end of the last found HTML table in the existing file. In the latter case, the field structure of the incoming data must be compatible with the field structure of the HTML table in the existing target file.

/TemplateFile=Value

Specifies a template file for HTML target format. The export procedure will enrich the template file with data from the current dataset and finally save the enriched template as a target file. Note: when using template, all export option will be ignored except template options, document title, and row count limit.

/ExportStepNo=Value

Specifies the current export step for HTML target format. When using template, export can be performed in several steps, and this option lets the application know which dynamic expressions from the template must be calculated during this step.

/UseRawData

Forces using raw data for HTML, JSON, and EXCELXLSX target formats.

/AddAutofilter

Adds autofilter for all columns for EXCELXLSX target format.

/DocTitle=Value

Specifies document title for HTML target format. If it includes spaces, entire parameter must be enclosed in quotes.

/UseGUIViewSettings

Forces the application to use GUI table view settings (fonts and colors) for target tables for HTML, PDF, EXCELXLSX, EXCELOLE, WORDOLE, and RTF target formats. This option is ignored in silent mode. Without this option or in silent mode, table(s) in target document will use some default fonts and colors. Note: Using this option can slow down the exporting process.

/AlternateRowColor=Value

Specifies alternate row color (background color of every second row) for HTML, PDF, EXCELXLSX, EXCELOLE, WORDOLE, and RTF target formats. The color must be specified in hexadecimal format, which is made up of sharp symbol (#), followed by three hex numbers, rr, gg, bb, that give values for red, green and blue, respectively; for example, #FF0000 represents pure red. Note: Using this option can slow down the exporting process.

/TableTitleFont=Value

Specifies the font of the table title for HTML, PDF, EXCELXLSX, EXCELOLE, WORDOLE, and RTF target formats. The font must be represented in the following form: fontname;fontsize;fontstyle;fontcolor. Example of the value: Tahoma;12;Bold Italic;#0000FF. See example 5. If the value contains spaces, the entire parameter must be enclosed in quotes.

/ColumnHeadersFont=Value

Specifies the font of the column headers for HTML, PDF, EXCELXLSX, EXCELOLE, WORDOLE, and RTF target formats. The font must be represented in the following form: fontname;fontsize;fontstyle;fontcolor. Example of the value: Verdana;10;Bold;#800000. If the value contains spaces, the entire parameter must be enclosed in quotes.

/RowsFont=Value

Specifies the font of the target data rows for HTML, PDF, EXCELXLSX, EXCELOLE, WORDOLE, and RTF target formats. The font must be represented in the following form: fontname;fontsize;fontstyle;fontcolor. Example of the value: Arial;10;Regular;#000000. If the value contains spaces, the entire parameter must be enclosed in quotes. Note: Using this option can slow down the exporting process for large datasets.

/TargetImageFormat=Value

Specifies format of target images for HTML target format. Possible values: PNG, JPEG, GIF, Bitmap, Metafile, Icon, <SOURCE>; in the last case, the target images will be created in the format which is determined from the source, i.e. no image format conversion is done.

/sqlSeparator=Value

Specifies SQL command separator for SQL target format. Can be any character or character code, which follows # symbol. There are also predefined separators:
sqlplus, which is usually used in Oracle SQL Plus utility and other Oracle specific tools and utilities; this is a slash (/) on a separate line between two statements;
mssqlgo, which is usually used in SQL Server tools; this is a GO word on a separate line between two statements.
Default value: semicolon (;).

/AddDDL

Forces the application to add DDL statement (CREATE TABLE...) into the output script before INSERT or MERGE statements for SQL target format. It should not be used together with /EmptyTable switch.

/EmptyTable

Forces the application to add TRUNCATE (if supported by target database) or DELETE statement into the output script before INSERT or MERGE statements for SQL target format. It should not be used together with /DropTable and /AddDDL switches.

/DropTable

Forces the application to add DROP TABLE statement into the output script before INSERT or MERGE statements for SQL target format. It should be used together with /AddDDL switch, and should not be used together with /EmptyTable switch.

/DDLCheckExistence

Forces the application to add IF NOT EXISTS clause in CREATE TABLE statement, and IF EXISTS clause in DROP TABLE statement for SQL target format. It works together with /AddDDL and/or /DropTable switches.

/TargetDBType=Value

Specifies target database type for SQL target format (for example, Access, DB2, Oracle etc.). This option lets the application to correctly encode some specific data types in output file (for example, boolean, date, time, and timestamp). If not specified, YYYY-MM-DD hh:mm:ss format (ANSI SQL standard) is used for dates and values are enclosed in single quotation marks; for boolean values, 'T' or 'F' is used.

/sqlTableName=Value

Specifies table name for SQL target format (used as table name in SQL statements). Ignored when exporting group of files / tables (in this case the table name of the source is used). If the switch includes spaces, it must be enclosed in quotes.

/sqlStatementType=Value

Specifies SQL statement type for SQL target format. Possible values: INSERT, BATCHINSERT, COPY (only if /TargetDBType is PostgreSQL), MERGE, UPDATE, or DELETE.
Default value: INSERT.

/KeyFields=Value

Specifies key fields (matching fields) for UPDATE, DELETE, MERGE commands for SQL and DATABASE target formats. This must be a name of a target field or a comma-separated list of several target field names.

For SQL target format, key fields must be specified when /sqlStatementType is MERGE, UPDATE, or DELETE. They are used in the ON (for MERGE) or WHERE (for UPDATE and DELETE) clause of SQL statements.

For DATABASE target format, key fields must be specified when /ExportMode is UPDATE, APPEND+UPDATE, or DELETE.

When field mappings are explicitly specified (in /FieldMappingsFile or /FieldMappings parameters), the key fields must be present there and map to the corresponding fields in target.

/encoding=Value

Encoding for XML, HTML, SQL, EXCELXML, DBF, or Database target format. For latter one, the encoding is important if you use /MemorySaving option. Possible values for XML, EXCELXML, SQL, Database and HTML: ASCII, UTF-8 and so on. Possible values for DBF: DBASE ENU CP437, DBASE DEU CP437, 'ASCII' ANSI and so on (see full list in GUI). If the encoding includes spaces, entire parameter must be enclosed in quotes.

/NoBOM

Specifies not to include BOM (byte order mark) when using Unicode encoding.

/LimitRecordCount=Value

Specifies a maximum number of records to be exported. If this option is not specified or it is less then 1, all records will be exported. If you want just create a file (table) without data exporting, use the corresponding export mode instead.

/RecordsPerLine=Value

Specifies the number of source records, which must be placed per one line in target. If not specified or erroneous, 1 is used. This option is ignored for XML, SYLK, DBF, PDF, DATABASE target formats.

/RowsPerSheet=Value

Specifies the number rows in one sheet for EXCELXML and EXCELXLSX target formats. If not specified or erroneous, 800000 is used. When exporting, if the number of outputted rows reached this value, the new sheet is automatically created.

/SheetName=Value

Specifies the the name of target Excel sheet to place the source data in for EXCELXLSX target format. If not specified, Sheet1 name is used.

/RangeName=Value

Specifies the the name of target Excel cell range with exported data (including column headers) for EXCELXLSX target format. If not specified, the corresponding range will not have a name.

/TableTitle=Value

Specifies the the table title, i.e. text to be shown above the table data in the target document for EXCELXLSX, EXCEL, EXCELXML, EXCELOLE, WORDOLE, HTML, PDF, RTF target formats.

/TableId=Value

Specifies a value for id attribute of HTML Table tag for HTML target format.

/FloatFormat=Value

Specifies format for numbers with floating points for EXCELXML target format.

/DateTimeFormat=Value

Specifies format for DateTime values for EXCELXML target format.

/LineTerminator=Value

Specifies style of line terminator in target file. Ignored for binary target formats (EXCEL, PDF, DBF, DATABASE). Possible values: WINDOWS, MAC, or UNIX.

/FieldMappingsFile=Value

Specifies the name of the file, which contains source-to-target field mappings. The content of the file must conform to the rules for field mappings files. If this option is omitted, /FieldMappings option is used. This option is ignored if target format is CUSTOM and for multi-table export (i.e. when you specify to export table list instead of one table). If the file name includes spaces, entire parameter must be enclosed in quotes.

/FieldMappingsOverrideFile=Value

Specifies the name of the file, which contains source-to-target field mappings overrides for general field mappings.

General field mappings can be built using /FieldMappingsFile, /FieldMappings, /columns options, or can be built automatically when these options are omitted. After the general mappings are built, the overrides are merged with them using source field name as a key: not existing items are added, and others overwrite target attributes of existing items.

Use the mappings overrides, when you omit general field mappings options and rely on automatically built mappings (especially useful for datasets with large number of fields), but have a few fields or expressions where the target attributes must not be created automatically.

The rules for this file is identical to rules for /FieldMappingsFile (see above).

This option is ignored if target format is CUSTOM and for multi-table export (i.e. when you specify to export table list instead of one table).

/FieldMappings=Value

Specifies source-to-target field mappings. This must be a semicolon-separated list of the mappings. Each mapping must hold a pair of source and target field names separated by equal sign, for example: PaymentId=PAYMENT_ID. Field names should not contain equals and semicolons. If this option is omitted, /columns option is used to determine the source columns to export, and target field names are determined automatically according to rules of target database (when possible). This option is ignored if target format is CUSTOM and for multi-table export (i.e. when you specify to export table list instead of one table). If the field names include spaces, entire parameter must be enclosed in quotes. This option is ignored if target format is CUSTOM and for multi-table export (i.e. when you specify to export table list instead of one table).

/FieldMappingsOverride=Value

Specifies source-to-target field mappings overrides for general field mappings. See the explanation of field mappings overrides in the /FieldMappingsOverrideFile description above.

The rules for this option is identical to rules for /FieldMappings (see above).

This option is ignored if target format is CUSTOM and for multi-table export (i.e. when you specify to export table list instead of one table).

/columns=Value

Specifies columns (fields) to export. This must be a list of field names or their numeric indexes, separated by semicolons. If not specified, and /FieldMappingsFile and /FieldMappings are omitted too, all source columns are exported, and target field names are determined automatically according to rules of target database (when possible). This option is ignored if target format is CUSTOM and for multi-table export (i.e. when you specify to export table list instead of one table). If the field names include spaces, entire parameter must be enclosed in quotes.

/FieldSourceToTargetSchema=Value

Specifies the way of naming target fields when field mappings are not specified. Possible values:

Auto Target fields are named using source field names and general naming rules of the target database.
Lower Target fields are named using source field names and general naming rules of the target database, and finally converted to the lower case.
Upper Target fields are named using source field names and general naming rules of the target database, and finally converted to the upper case.
MatchSource Target fields are named exactly as source field names. No validity checks are done.

Default value: Auto.

/TableMappingsFile=Value

Specifies the name of the file, which contains source-to-target table mappings for multi-table export. The content of the file must conform to the rules for table mappings files. If this option is omitted, source and target masks or lists must be specified. If the file name includes spaces, entire parameter must be enclosed in quotes. This parameter cannot be used together with /SrcTableName and /TrgTableName parameters.

/LogFile=Value

Specifies the name of the file to write export log. If the name includes spaces, entire parameter must be enclosed in quotes.

/AppendLog

Specifies that if the log file already exists, the current log will be appended to the end of the file. If this switch is omitted, existing log file will be overwritten.

/RecordLogFile=Value

Specifies the name of the file to write export log of detail (record) level. If the file name includes spaces, entire parameter must be enclosed in quotes. Attention! Using logging of detail level can slow down the exporting process.

/RecordLogExpression=Value

Specifies expression which result will be written to /RecordLogFile for each exported source record. If the expression includes spaces, entire parameter must be enclosed in quotes.

/AppendRecordLogFile

Specifies that if the /RecordLogFile already exists, the current log will be appended to the end of the file. If this switch is omitted, existing log file will be overwritten.

/BadRecordLogFile=Value

Specifies the name of the file to write export problem log of detail (record) level. If the file name includes spaces, entire parameter must be enclosed in quotes. Attention! Using logging of detail level can slow down the exporting process.

/BadRecordLogExpression=Value

Specifies expression which result will be written to /BadRecordLogFile for each erroneous source record. If the expression includes spaces, entire parameter must be enclosed in quotes.

/AppendBadRecordLogFile

Specifies that if the /BadRecordLogFile already exists, the current log will be appended to the end of the file. If this switch is omitted, existing log file will be overwritten.

/ErrorHandlingType=Value

Specifies how record level errors are processed. Possible values:

Stop

The exporting process is stopped when an error occurs.

StopCritical

The exporting process is stopped when the error count reaches the critical level (see /CriticalErrorCount).

Ask

If an error occurs, a dialog is shown, allowing user to stop or continue. This option is ignored in silent mode, where such prompts are always suppressed.

Ignore

If an error occurs, it is ignored and the process tries to continue with the next record. Not recommended.

SkipTable

If an error occurs, current source table is skipped and the process tries to continue with the next table. Only for multi-table exporting.

Default value: Stop.

/CriticalErrorCount=Value

Specifies the critical number of errors, required to stop the exporting process when /ErrorHandlingType=StopCritical.

Examples

1. Copy a table from .mdb file to clipboard

dbtour.exe /copy "/SrcDB=c:\my db\stores.mdb" "/SrcTableName=price"

2. Copy a table from SQLite database to clipboard

dbtour.exe /copy /SrcDbInterface=fd /SrcDbKind=file /SrcDbDriver=SQLITE /SrcDb=C:\MyData\books.db /SrcTableName=fiction

3. Export from DBF to HTML

dbtour.exe /export /encoding=Windows-1252 "/SrcDB=c:\my db\customer.dbf" "/TrgDB=c:\my db\customer.htm"

4. Export from DBF to RTF

dbtour.exe /export /IncludeMemo /exporttype=RTF "/sort=payername,paymentsum DESC" /SrcDBInterface=ado "/SrcDB=c:\my db\dbdesrc.dbf" "/TrgDB=c:\my db\dbdescr.rtf"

5. Export from Paradox to HTML

dbtour.exe /export /ExportType=HTML "/sort=serviceid, 4, 5" /columns=SERVICENAME;DESCR;PRICE "/SrcDB=c:\my db\advert.db" "/TrgDB=c:\my db\services.htm" "/TableTitle=Available Services" "/TableTitleFont=Tahoma;12;Bold Italic;#0000FF"

6. Export all .dbf files from a directory to .txt files

dbtour.exe /export /ExportType=TEXT /separator=#9 "/filter=BillSum > 200 and Name <> 'Parker'" "/SrcDB=c:\data\" "/SrcTableName=<MASK>*.dbf" "/TrgDB=c:\targets\" "/TrgTableName=<MASK>*.txt"

7. Export a table from .mdb file to HTML

dbtour.exe /export /SrcDBPassword=leo12 "/SrcDB=c:\my db\stores.mdb" "/SrcTableName=price" "/TrgDB=c:\my db\price.htm"

8. Export all tables from .mdb file to HTML files in silent mode

dbtour.exe /silent /export /SrcDBPassword=leo12 "/SrcDB=c:\my db\stores.mdb" "/SrcTableName=*" "/TrgDB=c:\my db\" "/TrgTableName=*.htm"

9. Export a table from SQLite to Firebird

dbtour.exe /export /ExportType=DATABASE /ExportMode=REPLACE+INSERT /CommitInterval=100 /MemorySaving /UseSQLParameters /UseBatchMode /SrcDBInterface=fd /SrcDBKind=FILE /SrcDBDriver=SQLITE /SrcDB=C:\MyData\billing.db /SrcTableName=contracts /TrgDBInterface=fd /TrgDBKind=FILE /TrgDBDriver=Firebird /TrgDBUserName=sysdba /TrgTableName=contracts /TrgPort=3050 /TrgProtocol=TCPIP /TrgOSAuthentication=No "/TrgVendorLibrary=C:\Program Files (x86)\Firebird\Firebird_3_0\fbclient.dll" "/TrgDB=C:\db\billing.fdb" /CreateTargetContainer

10. Export from Paradox to dBase V

dbtour.exe /export /ExportType=DBF /dbfVersion=5 "/encoding=DBASE DEU CP437" "/SrcDB=c:\my db\types.db" "/TrgDB=c:\my db\types.dbf"

11. Export a table from Oracle to Access in silent mode with writing results to a log file

dbtour.exe /silent /export /ExportType=DATABASE /ExportMode=REPLACE+INSERT /IncludeMemo /CommitInterval=200 /SrcDBInterface=ado /SrcDBKind=CONSTR /SrcDBDriver=ORACLE "/SrcDB=Provider=OraOLEDB.Oracle.1;Data Source=dwh;" /SrcDBUserName=stage /SrcDBPassword=stage_password /SrcTableName=USR_REQUEST /TrgDBInterface=ado /TrgDBKind=FILE "/TrgDBDriver=Microsoft Access" /TrgDB=C:\DWH\Requests.mdb /TrgTableName=USR_REQUEST /LogFile=C:\DWH\Log\export_req.log /AppendLog /CreateTargetContainer

12. The same as the previous one but exporting SQL query result instead of a table (differences with previous one are highlighted by bold font)

dbtour.exe /silent /export /ExportType=DATABASE /ExportMode=REPLACE+INSERT /IncludeMemo /CommitInterval=200 /SrcDBInterface=ado /SrcDBKind=CONSTR /SrcDBDriver=ORACLE "/SrcDB=Provider=OraOLEDB.Oracle.1;Data Source=dwh;" /SrcDBUserName=stage /SrcDBPassword=stage_password /SrcSQLFile=C:\DWH\Payments.sql /TrgDBInterface=ado /TrgDBKind=FILE "/TrgDBDriver=Microsoft Access" /TrgDB=C:\DWH\Requests.mdb /TrgTableName=PAYMENTS /LogFile=C:\DWH\Log\export_req.log /AppendLog /CreateTargetContainer

13. Export all tables from ODBC data source to .mdb file

dbtour.exe /export /ExportType=DATABASE /IncludeMemo /SrcDBInterface=ADO /SrcDBPassword=m980 "/SrcDB=<DSN>BOOKS" "/SrcTableName=<MASK>*" /TrgDBInterface=ADO /TrgDBKind=FILE /TrgDBDriver=Access "/TrgTableName=<MASK>*" /TrgDB=c:\MyBooks.mdb /CreateTargetContainer

14. The same as the previous one but using an action file
dbtour.exe "/ActionFile=c:\DBTourStartParameters.txt"

The contents of c:\DBTourStartParameters.txt file should be like the following:

;action
/export

;options

/IncludeMemo
/ExportType=DATABASE

;source definition
/SrcDBInterface=ADO
/SrcDBPassword=m980
/SrcDBKind=DSN
/SrcDB=BOOKS
/SrcTableName=<MASK>*

;target definition
/CreateTargetContainer
/TrgDBInterface=ADO
/TrgDBKind=FILE
/TrgDBDriver=Access
/TrgDB=c:\MyBooks.mdb
/TrgTableName=<MASK>*