Database Component Settings

www.altova.com Print this Topic Previous Page Up One Level Next page

Home >  Data Sources and Targets > Databases and MapForce > Introduction to Database Mappings >

Database Component Settings

After you add a database component to the mapping area, you can configure the settings applicable to it from the Component Settings dialog box. You can open the Component settings dialog box in one of the following ways:

 

Select the component, and then, on the Component menu, click Properties.
Double-click the component header.
Right-click the component, and then click Properties.

mf_db_component_settings

Database Component Settings dialog box

The available settings are as follows.

 

Database

This group displays database connection information. Click Change to select a different database, or to redefine the database objects in the existing database component. Connectors to tables of the same name will be retained. You can also change the tables in the component, by right clicking a database component and selecting Add/Remove/Edit Database Objects.

 

Data Source

Specifies the name of the current data source. For file-based databases, this can be a path on the file system.

 

Use this setting to determine whether a file-based database was added to the mapping using an absolute or relative path. In case of relative paths, "Data Source" contains a path; in case of absolute paths, it contains just the database filename.

Connection Name

Specifies the name of the connection. This name is generated automatically by MapForce. Typically it is the same as the data source name, but it may also be a so-called "alias" name if you are connecting with Altova Global Resources. If there are multiple database components with the same connection name on the mapping, then the name will take the form "<connection1>", "<connection2>", etc.

Database Kind

Specifies the kind of the database.

Connection String

Displays the current database connection string. This read-only field is generated based on the information you supply when creating or changing the database connection.

 

Login Settings

The login settings are used for all code generation targets and the built-in execution engine.

 

User

Enables you to change the user name for connecting to the database. Mandatory if the database requires a user name to connect.

Password

Enables you to change the password for connecting to the database. Mandatory if the database requires a password to connect.

 

JDBC-Specific Settings

These settings are used to connect to the database if the mapping contains a JDBC connection and is executed by generated Java code or by MapForce Server.

 

Note:ADO, ADO.NET, and ODBC connections are converted to JDBC (and the JDBC settings below apply) when the mapping is run on a Linux or macOS machine, see Database mappings in various execution environments.

 

JDBC Driver

Displays the currently active driver for the database component. The default driver is automatically entered when you define the database component. You can change the driver entered here to suit your needs. Make sure that the syntax of the entry in the Database URL field conforms to the specific driver you choose.

Database URL

URL of the currently selected database. Make sure that this entry conforms to the JDBC driver syntax, of the specific driver entered in the JDBC-driver field.

 

ADO/OLEDB-Specific Settings

These settings are used to connect to the database if the mapping contains an ADO connection and it is executed by generated C# or C++ code, or by MapForce Server running on Windows, see Database mappings in various execution environments. The Data Source and Catalog settings are not used by the built-in execution engine.

 

Data Source

Displays the name of the ADO data source.

Catalog

Displays the name of the ADO catalog.

Provider

Displays the currently active provider for the database component.

Add. Options

Displays any additional database options.

 

Generation settings

Generation settings apply to all code generation targets as well as the built-in execution engine.

 

Strip schema names from table names

Allows you to strip database schema names from generated code, only retaining the table names for added flexibility.

 

Note that this option works only for SQL Select statements generated by MapForce. User-defined SQL-Statements, when creating virtual tables, will not be modified.

 

Timeout for statement execution

When a database is used as a target component, execution timeouts can occur due to server availability, traffic, long-running triggers, and other factors. This setting allows you to define how long the timeout period can be before the database connection is closed. The setting takes effect when querying database data as well as in generated C#, Java, and C++ code.

 

Timeout

Defines the time period, in seconds, that the execution engine must wait for a database response before aborting the execution of the database statement. The default setting for the execution timeout is 60 seconds.

Infinite

When enabled, this option instructs the execution engine to never time out.

 

Note:Timeout for statement execution is not applicable to SQLite databases.

 

Database transaction handling

Use transactions

Enables transaction processing when using a database as a target. Transaction processing is enabled for all tables of the database component when you select this option. For more information, see Handling Database Exceptions.

 

Traces

Trace level

Applicable for target database components. When tracing is enabled, the actions performed by the mapping against the database are logged in a trace file. You can choose to log all actions, only errors, or disable tracing completely. For more information, see Database Tracing and Error Logging.

Trace file

Specifies the file to which database trace information will be written when the mapping runs. The trace file is in XML format, see Trace File Structure. This path can be either absolute or relative, and is influenced by the Save all file paths relative to MFD file checkbox.

 

Save all file paths relative to MFD file

When this option is enabled, MapForce saves the file paths displayed on the Component Settings dialog box relative to the location of the MapForce Design (.mfd) file. Use relative paths if you intend to run the mapping with MapForce Server on a different operating system. See also Using Relative Paths on a Component.


© 2019 Altova GmbH