Valid For



Use the TARGETDB parameter for databases or data sets that require a data source name or identifier to be specified explicitly as part of the connection information. This option is required to identify one of the following:

  • The target login database for heterogeneous databases.

  • The target data source name (DSN) if Replicat uses ODBC to connect to the database.

  • The target SQL/MX catalog

Tables specified in MAP statements that follow TARGETDB are assumed to be from the specified data source.

You might need to use the USERID or USERIDALIAS parameter in the TARGETDB parameter statement, depending on the authentication that is required for the data source.

For databases that allow authentication at the operating-system level, you can specify TARGETDB without USERID or USERIDALIAS.

For DB2 LUW, the TARGETDB statement must refer to the database by its real name, rather than by any alias.

See USERID or USERIDALIAS for more information.

See also SOURCEDB to specify a source data source.




TARGETDB data_source[, SESSIONCHARSET character_set]

The name of the database, catalog, or data source name.

For MySQL databases, you can use the format of TARGETDB database_name@host_name to avoid connection issues caused by the incorrect configuration of localhost in the local hosts file. If running MySQL on a port other than the default of 3306, you must specify the port number in the connect string: TARGETDB database_name@host_name:port.

SESSIONCHARSET character_set

Supports Sybase, Teradata and MySQL. Sets the database session character set for the process login session. This parameter overrides any SESSIONCHARSET that is specified in the GLOBALS file.


Example 1   

This example shows TARGETDB without the USERIDALIAS parameter.

Example 2   

This example shows TARGETDB with the USERIDALIAS parameter.