The setupCDC.sh script configures an Oracle database with the necessary CDC tables to enable heterogeneous replication from Oracle to MySQL.
The script accepts one argument, the filename of the configuration file that
will define the CDC configuration. The file accepts the parameters as listed
in Table 8.19, “setupCDC.conf
Configuration Options”.
Table 8.19. setupCDC.conf
Configuration Options
CmdLine Option | INI File Option | Description |
---|---|---|
cdc_type | cdc_type | The CDC type to be used to extract data, either synchronous (using triggers) or asynchronous (using log processing). |
delete_publisher | delete_publisher | Whether the publisher user should be deleted. |
delete_subscriber | delete_subscriber | Whether the subscriber user should be deleted. |
enable_archivelog | enable_archivelog | If set to true, the Oracle instance will be configured to enable archive logging (required by Oracle CDC), and then the Oracle instance will be restarted. |
pub_password | pub_password | The publisher password that will be created for the CDC service. |
pub_tablespace | pub_tablespace | Use the specified tablespace for CDC publishing instead of system tablespace |
pub_user | pub_user | The publisher user that will be created for this CDC service. |
service | service | The service name of the Tungsten Replicator service that will be created. |
source_user | source_user | The source schema user with rights to access the database. |
specific_path | specific_path | The path where the tungsten.tables file is located; the file must be in a shared location accessible by Tungsten Replicator. |
specific_tables | specific_tables | If enabled, extract only the tables defined within a tungsten.tables file. |
sys_pass | sys_pass | The system password to connect to Oracle as SYSDBA. |
sys_user | sys_user | The system user to connect to Oracle as SYSDBA. |
tungsten_pwd | tungsten_pwd | The password for the subscriber user. |
tungsten_user | tungsten_user | The subscriber (Tungsten user) that will subscribe to the changes and read the information from the CDC tables. |
Where:
− cdc_type
Option | cdc_type | |
Config File Options | cdc_type | |
Description | The CDC type to be used to extract data, either synchronous (using triggers) or asynchronous (using log processing). | |
Value Type | string | |
Valid Values | CDCASYNC | Enable asynchronous capture |
CDCSYNC | Enable synchronous capture |
The CDC type to be used to extract data, either synchronous (using triggers) or asynchronous (using log processing).
Option | delete_publisher | |
Config File Options | delete_publisher | |
Description | Whether the publisher user should be deleted. | |
Value Type | string | |
Valid Values | 0 | Do not the delete the user before creation |
1 | Delete the user before creation |
Whether the publisher user should be deleted.
Option | delete_subscriber | |
Config File Options | delete_subscriber | |
Description | Whether the subscriber user should be deleted. | |
Value Type | string | |
Valid Values | 0 | Do not the delete the user before creation |
1 | Delete the user before creation |
Whether the subscriber user should be deleted.
Option | enable_archivelog | |
Config File Options | enable_archivelog | |
Description | If set to true, the Oracle instance will be configured to enable archive logging (required by Oracle CDC), and then the Oracle instance will be restarted. | |
Value Type | boolean | |
Valid Values | 0 | Do not automatically enable the archive log during setup |
1 | Automatically enable the archive log during setup |
If set to true, the Oracle instance will be configured to enable archive logging (required by Oracle CDC), and then the Oracle instance will be restarted.
Option | pub_password | |
Config File Options | pub_password | |
Description | The publisher password that will be created for the CDC service. | |
Value Type | string |
The publisher password that will be created for the CDC service.
Option | pub_tablespace | |
Config File Options | pub_tablespace | |
Description | Use the specified tablespace for CDC publishing instead of system tablespace | |
Value Type | string |
By default, the system tablespace is used for holding the
publisher tables. Using the system tablespace should only be
used during testing, as the tablespace is typically not large
enough to hold the required change data. If set to 1, use the
created tablespace (matching the value of
pub_user
) which is assumed
to be large enough to hold the change information.
− pub_user
Option | pub_user | |
Config File Options | pub_user | |
Description | The publisher user that will be created for this CDC service. | |
Value Type | string |
The publisher user that will be created for this CDC service.
− service
Option | service | |
Config File Options | service | |
Description | The service name of the Tungsten Replicator service that will be created. | |
Value Type | string |
The service name of the Tungsten Replicator service that will be created.
Option | source_user | |
Config File Options | source_user | |
Description | The source schema user with rights to access the database. | |
Value Type | string |
The source schema user with rights to access the database.
Option | specific_path | |
Config File Options | specific_path | |
Description | The path where the tungsten.tables file is located; the file must be in a shared location accessible by Tungsten Replicator. | |
Value Type | string |
The path where the tungsten.tables file is located; the file must be in a shared location accessible by Tungsten Replicator.
Option | specific_tables | |
Config File Options | specific_tables | |
Description | If enabled, extract only the tables defined within a tungsten.tables file. | |
Value Type | string | |
Valid Values | 0 | Extract all tables |
1 | Use a tables file to select tables |
If enabled, extract only the tables defined within a tungsten.tables file.
− sys_pass
Option | sys_pass | |
Config File Options | sys_pass | |
Description | The system password to connect to Oracle as SYSDBA. | |
Value Type | string |
The system password to connect to Oracle as SYSDBA.
− sys_user
Option | sys_user | |
Config File Options | sys_user | |
Description | The system user to connect to Oracle as SYSDBA. | |
Value Type | string |
The system user to connect to Oracle as SYSDBA.
Option | tungsten_pwd | |
Config File Options | tungsten_pwd | |
Description | The password for the subscriber user. | |
Value Type | string |
The password for the subscriber user.
Option | tungsten_user | |
Config File Options | tungsten_user | |
Description | The subscriber (Tungsten user) that will subscribe to the changes and read the information from the CDC tables. | |
Value Type | string |
The subscriber (Tungsten user) that will subscribe to the changes and read the information from the CDC tables.
To use, supply the name of the configuration file to setupCDC.sh:
shell> ./setupCDC.sh sample.conf