Key Features: Command Line Using

In Database Tour Pro, the most important operations like exporting data, executing queries, and so on can be performed using the command line. In the command line mode, it is possible to work with all options which are available in GUI.

Sometimes, the command line can have very large number of options, which is inconvenient. As an alternative, all command line options can be put into one action file. Action files can be executed either from the command line or from GUI.

Both the command line and action file can include environment variables, which improves the flexibility and gives an ability to reuse the code.

Examples of Command Lines

Data Exporting

Export one table from .mdb file to .html

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

Export data using an action file

dbtour.exe "/ParamsFile=c:\My Action Files\export-postgres-to-firebird.txt"

Export all tables from .accdb file to .xlsx files in silent mode

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

Batch Operations with Text Data

Replacing text in Access table

dbtour.exe /FieldUtils /CloseWhenDone /CloseOnError /DBInterface=ADO /DBDriver=ACCESS /DB=c:\MyData\Genealogy.mdb /TableName=ADDR /fields=Address1 "/ReplaceText=Mark Tweine street," "/ReplaceText=Mark Tweine str.," /ReplaceIgnoreCase

Opening Databases, SQL Scripts, Report Files

Open a folder based DBF database and open a table in it

dbtour.exe /opendb /DBInterface=ADO /DBDriver=dBase /DBKind=FOLDER "/DB=c:\MyData" "/TableName=customer.dbf"

Open an Interbase database, execute an SQL script in it, and then close all

dbtour.exe /opendb /CloseWhenDone /DBInterface=INTERBASE /DBDriver=INTERBASE /DBKind=FILE "/DB=MyServerName:D:\CommonData\News.gdb " /DBUserName=JohnM /DBPassword=qazwsx78 /SQLFile=d:\MyScripts\CheckData.sql /ExecuteQuery

Building Command Lines

The great advantage of this tool is that the command line or action file can be easily built automatically from the GUI using the interface very similar to GUI interface of the corresponding operation:

Generating a command line for batch operations with text fields:

Generating a Command Line from GUI

Generating a command line for exporting data:

Generating a Command Line for Exporting Data from GUI

For more details about the command line parameters, please see Database Tour documentation:

Command Line Usage

Action File