Database Tour Documentation Contents Index

Command Line Usage: Export / Import Data

Top Previous Next

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.

Before you start...

Advanced users can build the needed command line manually using the specification below. But if you are a beginner or just need to create a command line for simple export operation, you can save your time using Database Tour command line builder. The command line builder interface is very similar to Export dialog and uses the same export options, but it produces a command line string instead of running export operation. To generate a command line, choose 'Tools | Generate Command Line | Export / Import data...' menu. In 'Generate Command Line' window, specify needed export options and click OK. A new window will appear with the command line generated. Copy it, correct it if it is needed, and use in Database Tour calls from your own programs, .bat files etc.

Please note that the command line builder cannot generate any type of command line. It produces only generic command lines which is enough for the most of needs and good point to start from. Generated command line can be easily changed manually for more complex tasks. For example, you need just replace /export switch with /copy switch when you want to copy data to clipboard instead of export them to file or database; replace the table name with asterisk if you want to export all tables from a specified database, and so on. Also, command line builder cannot generate export/import related command lines which use SQL features like specifying a file with SQL text, providing list of SQL parameters or macros etc.; you can easily add these parameters manually.

Usage

Command line options and their descriptions

Examples

Usage

Classic command line format.

The command line consists of all needed switches and parameters:

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

Short 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 /ParamsFile parameter (which points to the action file path) and an optional /silent parameter:

dbtour.exe [/silent] /ParamsFile=ActionFileName

Command line options and their descriptions

</export> | </copy>

Tells the program either to export data to file or database or to copy data to clipboard.

[/silent]

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

[/ParamsFile=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]

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, BDE alias name, or connection string. If the name includes spaces, entire parameter must be enclosed in quotes. If the name is an ADO connection string with quotes inside, it is recommended to use the short format of the command line.

[/SrcDBInterface=Value]

Specifies database interface (database engine) used to connect the source database. Possible values: ADO, FIREDAC, 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 program 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 program 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=FireDAC 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=FireDAC 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=FireDAC option.

[/SrcOSAuthentication]

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

[/SrcAutenticationMode=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=FireDAC option.

[/SrcVendorLibrary=Value]

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

[/SrcVendorHomepath=Value]

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

[/SrcSystemDB=Value]

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

[/SrcReadOnly]

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

[/SrcTableName=Value]

Specifies a source table name to open. If this parameter is omitted and the source database is file, the program 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 program 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 program 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.

[/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 and /SrcDBInterface=BDE options.

[/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 and /SrcDBInterface=BDE options.

[/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 name of target file or database. This can be a file name, folder name, ODBC DSN, BDE alias name, or connection string. If the name includes spaces, entire parameter must be enclosed in quotes. If the name is an ADO connection string with quotes inside, it is recommended to use the short format of the command line.

[/TrgDBInterface=Value]

Specifies database interface (database engine) used to connect the target database for DATABASE export format. Possible values: ADO, FIREDAC, 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 program 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 program 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=FireDAC 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=FireDAC 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=FireDAC option.

[/TrgOSAuthentication]

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

[/TrgAutenticationMode=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=FireDAC 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=FireDAC 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=FireDAC 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=FireDAC option.

[/TrgTableName=Value]

Specifies target table name. If this parameter is omitted and the target is file, the program 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.

[/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.

[/dbfVersion=Value]

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

[/OpenTarget]

Forces the program to open target file or table after successful export execution. In multi-table exporting, only the last created target file or table is opened.

[/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. Notes: This mode may work differently for different target database types/interfaces, therefore it is recommended to test it carefully before using on production systems.

[/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.

[/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 (including CSV)
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 workbook (binary file)
EXCELXLSX export to Excel 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

If this parameter is omitted or erroneous, the program 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 program to close itself after successful query execution. This option is ignored in 'silent' mode where the program is closed automatically anyway.

[/CloseOnError]

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

[/minimize]

Program 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 program runs without any windows.

[/[include]images]

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

[/[include]memo]

Specifies either to include contents of MEMO (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.

[/[include]colnames]

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. This option is ignored if /textSchema is expr.

[/separator=Value]

Specifies the field separator for TEXT target format. Сan 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 options cannot be used together with /FixedFieldLength switch. This option is ignored if /textSchema is expr.

[/TextExpression=Value]

Specifies the custom expression for TEXT target format when /textSchema is expr.

[/TextSchema=Value]

Specifies the schema for TEXT target format. Possible values:

standard or 0
ado or 1
bde or 2
expr or 3

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 program to use CDATA attribute in text data for XML target format (for simple schema only).

[/QuoteAllFields]

Forces the program 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 unuseful 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.

[/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 program know which dynamic expressions from the template must be calculated during this step.

[/DocTitle=Value]

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

[/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.

[/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 program to add DDL statement (CREATE TABLE...) into the output script before INSERT or MERGE statements for SQL target format.

[/TargetDBType=Value]

Specifies target database type for SQL target format (for example, Access, DB2, Oracle etc.). This option lets the program 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, COPY (only if /TargetDBType is PostgreSQL), MERGE, UPDATE, or DELETE. Default value: INSERT.

[/KeyFields=Value]

Specifies key fields (matching fields) for SQL and DATABASE target formats. This must be a name of a source field or a comma-separated list of several source 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, or DBF target format. Possible values for XML, EXCELXML, SQL 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.

[/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.

[/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 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. This option is ignored if target format is TEXT and /textSchema is expr.

[/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 TEXT and /textSchema is expr.

[/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 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 TEXT and /textSchema is expr.

[/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 TEXT and /textSchema is expr.

[/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 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 TEXT and /textSchema is expr.

[/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.

[/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 one table from .mdb file to clipboard
dbtour.exe /copy "/SrcDB=c:\my db\stores.mdb" "/SrcTableName=price"

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

3. Export .dbf -> .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"

4. Export .db -> .htm
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"

5. Export all .dbf files from 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"

6. Export one table from .mdb file to .htm
dbtour.exe /export /SrcDBPassword=leo12 "/SrcDB=c:\my db\stores.mdb" "/SrcTableName=price" "/TrgDB=c:\my db\price.htm"

7. Export all tables from .mdb file to .htm files in silent mode
dbtour.exe /silent /export /SrcDBPassword=leo12 "/SrcDB=c:\my db\stores.mdb" "/SrcTableName=*" "/TrgDB=c:\my db\" "/TrgTableName=*.htm"

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

9. Export a table from Oracle database to Access database in silent mode with writing results to a log file. The target file must exist.
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

10. 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

11. Export all tables from ODBC data source to .mdb file. The target file must exist.
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

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

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

;action
/export

;options

/IncludeMemo

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

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