1.148 SOURCEDB

Valid For

Non-Oracle (heterogeneous) databases, Extract, DEFGEN

Description

Use the SOURCEDB 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 source database for heterogeneous databases.

  • The data source name (DSN) for supported databases that use ODBC

  • The default DB2 for i database.

Tables specified in TABLE statements that follow SOURCEDB are assumed to be from the specified data source.

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

To connect Oracle GoldenGate processes to Azure Database for MySQL, ensure that the USERID value of SOURCEDB is enclosed within double quotes. This support is available from the Oracle GoldenGate 19c (19.1.0.0.200414) release onward.

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

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

See USERID | NOUSERID or USERIDALIAS for more information.

Default

None

Syntax

SOURCEDB data_source[, SESSIONCHARSET character_set]
data_source

The name of the database, catalog, or data source name as applicable for the database.

For MySQL databases, you can use the format of SOURCEDB 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: SOURCEDB database_name@host_name:port.

SESSIONCHARSET character_set

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

Examples

Example 1   

This example shows SOURCEDB using OS-level authentication.

SOURCEDB mydb
Example 2   

This example shows SOURCEDB with the USERIDALIAS parameter.

SOURCEDB mydb, USERIDALIAS tiger1
Example 3   
This example shows Oracle GoldenGate processes connecting to Azure Database for MySQL:
SOURCEDB mysqlsrcdb@mysqlservername.mysql.database.azure.com USERID “ogguser@mysqlservername” PASSWORD password