3 Oracle GoldenGate Classic for Oracle
- Deploying Oracle GoldenGate Classic Architecture for Oracle Database
- Finding Oracle GoldenGate within the Oracle Cloud Marketplace
- Launching Oracle GoldenGate Classic
- Getting Started with Oracle GoldenGate Classic Compute Node
- Getting Started with Oracle GoldenGate Classic for Oracle Database
- Connecting to Data Resources for Oracle GoldenGate Classic
Deploying Oracle GoldenGate Classic Architecture for Oracle Database
By using Oracle GoldenGate Classic Architecture on Marketplace, you can deploy Oracle GoldenGate in an off-box architecture, which means you can run and manage your Oracle GoldenGate deployment from a single location.
Here are the prerequisites required to deploy Oracle GoldenGate Classic:
- Oracle Cloud Account
- Access to compute node resources within Oracle Cloud
Parent topic: Oracle GoldenGate Classic for Oracle
Finding Oracle GoldenGate within the Oracle Cloud Marketplace
To launch Oracle GoldenGate Classic, from Oracle Cloud Marketplace follow these steps:
- Log in to Oracle Cloud Marketplace.
- From the Oracle Cloud Marketplace home page, use the search box under Applications and search for the keyword GoldenGate.
- From the search results, select Oracle GoldenGate.
Parent topic: Oracle GoldenGate Classic for Oracle
Launching Oracle GoldenGate Classic
- From the Application page, select Get App.
- Select OCI Region or Log in using your OCI account login credentials.
- OCI Region – Select the OCI Region for which you want to install the compute node and click Create Stack.
- In the Sign In to the Cloud Tenant page, provide the OCI tenant details.
- Sign in to the Identity provider.
- On the Oracle GoldenGate 19c for Oracle page, provide the following
information:
- Select Version - It provides a list of versions that are available in the listing.
- Select Compartment - Specifies the compartment where the compute node will be built. It is generally the location that you have access to build the compute node.
- Terms of Use - This checkbox is selected by default. Oracle recommends to review the licenses before proceeding.
- Launch Stack - It launches the stack in the OCI environment.
- Fill in the Stack Information, which includes the name of the stack, description and tags. The details of the compartment where the compute node is built are pre-populated and are not editable. Click Next.
- Fill in the required details to Configure Variables. This information is required to build the compute node for Oracle GoldenGate Classic.
- Name for New Resources -
- Display Name – Display name used to identify all new OCI resources.
- Host DNS Name – Name of the Domain Name Service for the new compute node.
- Network Settings -
- Create New Network – Select this check box if you wish to create a new network resource.
- If you select this check box, the Create New Network wizard appears allowing you to add and edit the new network information.
- If you do not select this check box, the Create New Network wizard does not appear and the compute node is created with the existing network options in the VCN.
- Network Compartment (optional) – Compartment for new or existing network resources.
- VCN (optional) – Existing VCN to use for the newly created instance if you are not creating a new network.
- Subnet (optional) – Existing subnet to use for the newly created instance if you are not creating a new network.
- Create New Network – Select this check box if you wish to create a new network resource.
- Instance Settings -
- Compute Shape – Shape of new compute instance. Supported shapes are VM.Standard2.4, VM.Standard2.8, VM.Standard2.16 and VM.Standard2.24.
- Assign Public IP – Select this check box to indicate if the new VM should have a public IP address.
- Availability Domain – The availability domain for the new Oracle GoldenGate instance.
- Custom Volume Sizes – Select this check box to customize the size of new block storage volumes.
- SSH Public Key - Public Key used for allowing SSH access as the
opc
user
- Name for New Resources -
- Click Next.
- On the Review page, review the information you provided and then click Create.
- After clicking Create, you are navigated to the Stacks Job Details page. From this page, you can monitor the creation of compute node.
- Once you see the build successful message from the Job Details page, you can now view the Oracle GoldenGate Classic compute node under Compute -> Instances.
Parent topic: Oracle GoldenGate Classic for Oracle
Getting Started with Oracle GoldenGate Classic Compute Node
- Log in to your Oracle Cloud Console.
- Select Compute -> Instances.
- Select the hyperlink name of the compute node. The public IP Address is listed under Primary VNIC Information.
- To access the compute node where Oracle GoldenGate is running, connect as the
opc
account using SSH. For more information on how to access a node using theopc
account refer to Connecting to an Instance.
ssh -i <private-key-filename> opc@<public-id-address>
Parent topic: Oracle GoldenGate Classic for Oracle
Running GGSCI
A custom utility called ggsci
is
available in the /usr/local/bin
directory, which helps you to
ensure correct environment variables are created in the environment. But for using
this, you have to set a mandatory parameter. For example, for Oracle Database
19c:
-bash-4.2$ ./ggsci oracle19
Oracle GoldenGate Command Interpreter for Oracle
Version 19.1.0.0.1 OGGCORE_19.1.0.0.0_PLATFORMS_190524.2201_FBO
Linux, x64, 64bit (optimized), Oracle 19c on May 25 2019 15:07:20
Operating system character set identified as UTF-8.
Copyright (C) 1995, 2019, Oracle and/or its affiliates. All rights reserved.
GGSCI (ogg19ccls) 1>
-bash-4.2$ ./ggsci
Usage: ./ggsci <oracle-version>
Example: ./ggsci oracle11, oracle12, oracle18, oracle19
Note:
Do not run the GGSCI command from the/u01/app/ogg
directory.
Creating Oracle GoldenGate Subdirectories
$ cd $OGG_HOME
$ ./ggsci
GGSCI> create subdirs
After creating the sub-directories, you can find them in /home/opc/oracle<##>
directory. Although they appear in /home/opc/oracle<##>
location, the contents are written to/u02/deployments/<directory>
. This helps you to improve tolerance, if something had happened to the Oracle GoldenGate Compute Node.
Getting Started with Oracle GoldenGate Classic for Oracle Database
After deploying Oracle GoldenGate Classic on the Oracle Cloud Marketplace, you can access the latest release of Oracle GoldenGate Classic.
Before you can start using Oracle GoldenGate Classic, there are a few tasks that you must perform to ensure that your environment is complete and ready to replicate your data. Before you begin data replication, you must perform the following tasks:
Topics:
- Configuring Source or Target Database for Replication
- Establishing Connectivity with Oracle GoldenGate Classic
- Updating Network Related Files for Oracle GoldenGate Classic
- Creating Database Credentials for Oracle GoldenGate Classic
- Adding SchemaTrandata for Oracle GoldenGate Classic
- Creating Checkpoint Table for Oracle GoldenGate Classic
- Enabling Heartbeat Table for Oracle GoldenGate Classic
- Configuring Capture Support for Oracle GoldenGate Classic
- Configuring Apply Support for Oracle GoldenGate Classic
- Configuring Source or Target Database for Replication
- Establishing Connectivity with Oracle GoldenGate Classic
- Updating Network Related Files for Oracle GoldenGate Classic
- Creating Database Credentials for Oracle GoldenGate Classic
- Adding SchemaTrandata for Oracle GoldenGate Classic
- Creating Checkpoint Table for Oracle GoldenGate Classic
- Enabling Heartbeat Table for Oracle GoldenGate Classic
- Configuring Capture Support for Oracle GoldenGate Classic
- Configuring Apply Support for Oracle GoldenGate Classic
Parent topic: Oracle GoldenGate Classic for Oracle
Configuring Source or Target Database for Replication
Establishing Connectivity with Oracle GoldenGate Classic
The Oracle GoldenGate Classic on Marketplace compute node acts as a hub where you can manage your connections to source and target database. To do this, establish a network connection between the compute node and your source and target database. The compute node is pre-configured with the Oracle Database Client software and is ready to use.
You have to provide sqlnet.ora
and
tnsnames.ora
files in the TNS_ADMIN
directory, to
establish connection between source or target database and the compute node. On a
deployment basis, the TNS_ADMIN
directory has been established
as /u02/deployments/<deployment_name>
.
Updating Network Related Files for Oracle GoldenGate Classic
The Oracle GoldenGate on Marketplace Compute Node comes pre-configured with Oracle Client installed. In order to establish network configuration between the compute node and the source or target systems within your architecture, you have to add or update the network related files in the Oracle Client.
You can find these files in the TNS_ADMIN
location and the
recommended location is/u02/deployment/oracle<##>/network/admin
. To
create this structure per Oracle Client release, perform the following steps:
- Connect to the Oracle GoldenGate Marketplace Compute Node, using
opc
user credentials. - Change directories to the location
/u02/deployment/oracle<##>
. - Create the directory structure for
TNS_ADMIN
mkdir -p ./network/admin
Note:
If you want the networking directory structure to be consistent with other Oracle products, you must append/network/admin
to the directory structure. For this you have to change the environment variableTNS_ADMIN
. For more information on Local Naming Parameters, refer to Database Net Services Reference. - Copy the existing
sqlnet.ora
andtnsnames.ora
files to the admin directory. You have to add or update these files on the compute node.The following is an example of
sqlnet.ora
file:NAMES.DIRECTORY_PATH= (TNSNAMES, ONAMES, HOSTNAME) NAMES.DEFAULT_DOMAIN = ora.com
The following is an example of
tnsnames.ora
file:TEST = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = test2)(PORT = 1521)) ) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = test) ) )
Creating Database Credentials for Oracle GoldenGate Classic
tnsnames.ora
file to connect to the required database.
To create database credentials, perform the following tasks:
Adding SchemaTrandata for Oracle GoldenGate Classic
Creating Checkpoint Table for Oracle GoldenGate Classic
Note:
You can predetermine a default checkpoint table name by ensuring the parameter CHECKPOINTTABLE
<table name>
in the GLOBALS
file.
To create a checkpoint table, follow these steps:
Enabling Heartbeat Table for Oracle GoldenGate Classic
To implement the Automatic Heartbeat table, perform the following steps:
Configuring Capture Support for Oracle GoldenGate Classic
- Classic Extract
- Integrated Extract
- Initial Load Extract
To decide on which type of capture to use, refer to Deciding Which Capture Method to Use section of Using Oracle GoldenGate for Oracle Database Guide.
To build any of these Extracts, perform the following steps in Oracle GoldenGate Classic:
Configuring Apply Support for Oracle GoldenGate Classic
- Integrated Replicat
- Classic Replicat
- Coordinated Replicat
- Parallel Replicat in Integrated Mode
- Parallel Replicat in Non-Integrated Mode
To decide on which Replicat to use, refer to Deciding Which Apply Method to Use section of Using Oracle GoldenGate for Oracle Database Guide.
To build any of these Replicats, perform the following steps on Oracle GoldenGate Classic:
Connecting to Data Resources for Oracle GoldenGate Classic
Learn about different methods of connecting Oracle GoldenGate data sources and targets. It includes the following connection types:
- Connecting to Oracle Database (on-premises) for Oracle GoldenGate Classic
- Connecting to Oracle Database as a Service for Oracle GoldenGate Classic
- Connecting to Oracle Autonomous Data Warehouse/Autonomous Transaction Processing
Parent topic: Oracle GoldenGate Classic for Oracle
Connecting to Oracle Database (on-premises) for Oracle GoldenGate Classic
You can use Oracle GoldenGate Classic on Marketplace to remotely capture from and apply data to on-premises Oracle database resources. This allows you to enable replication and centrally manage the replication processes.
You can use Oracle GoldenGate Classic to replicate data between data resources in the following use cases:
- Migrations
- Data Distribution
- Real-Time Data Warehousing
- Operational Reporting
Prerequisites
Ensure that the following are set up before you begin replication:
- Oracle GoldenGate Classic
- Source Database
- Target Database
To move data from on-premises to the cloud or from on-premises to on-premises, perform the following tasks :
Configure Oracle Database for Replication
- Configure Logging Properties
- Enable Supplemental Logging
- Enable Oracle GoldenGate within the Oracle Database
- Update parameter for
enable_goldengate_replication
- Update parameter for
For more details, refer to Preparing the Database for Oracle GoldenGate documentation.
Configure Oracle GoldenGate Classic Compute Node
To establish connection from the Oracle GoldenGate Classic Compute Node to
your on-premises database, you must edit the tnsnames.ora
file and
point the entry to your database resources.
By default, the environment variable TNS_ADMIN
is
pre-configured for each deployment. But the files tnsnames.ora
or
sqlnet.ora
are not readily available on the compute node. You need
to create the files or copy them from an existing file. You can locate the files
tnsnames.ora
or sqlnet.ora
in the pre-configured
locarion as illustrated in the below table:
Table 3-1 Oracle Database Client directories
Oracle Database Version | Directory |
---|---|
Oracle 11g |
/u02/deployments/oracle<##>/network/admin |
Oracle 12c |
/u02/deployments/oracle<##>/network/admin |
Oracle 18c |
/u02/deployments/oracle<##>/network/admin |
Oracle 19c |
/u02/deployments/oracle<##>/network/admin |
Note:
- If you are using Oracle Autonomous product client credentials, then you have to
edit the
tnsnames.ora
file. - If you want your networking directory structure to be consistent with other
Oracle products, you must append
/network/admin
to the directory structure. For this you have to change the environment variableTNS_ADMIN
. For more information on Local Naming Parameters, refer to Database Net Services Reference.
Connecting to Oracle Database as a Service for Oracle GoldenGate Classic
You can use Oracle GoldenGate Classic on Marketplace to remotely capture and apply data to Oracle Cloud Infrastructure (OCI) Database as a Service (DBaaS) resources. This allows you to enable replication in a scalable fashion, centralize the point of management, and enable replication between cloud services.
Prerequisites
Ensure you have the following prerequisites before replicating data from on-premises:
- Oracle GoldenGate Classic on Marketplace
- Source Database
- Oracle Cloud Infrastructure (OCI) Database as a Service (DBaaS) Instance
To move data from on-premises to the cloud or from on-premises-to-on-premises, perform the following tasks :
Configure Oracle Database for Replication
- Configure Logging Properties
- Enable Supplemental Logging
- Enable Oracle GoldenGate within the Oracle Database
- Update parameter for
enable_goldengate_replication
- Update parameter for
For more details, refer to Preparing the Database for Oracle GoldenGate documentation.
Configure Oracle GoldenGate Classic Compute Node
To establish connection from the Oracle GoldenGate Classic Compute Node to
your on-premises database, you must edit the tnsnames.ora
file and
point the entry to your database resources.
By default, the environment variable TNS_ADMIN
is
pre-configured for each deployment. But the files tnsnames.ora
or
sqlnet.ora
are not readily available on the compute node. You need
to create the files or copy them from an existing file. You can locate the files
tnsnames.ora
or sqlnet.ora
in the pre-configured
locarion as illustrated in the below table:
Table 3-2 Oracle Database Client directories
Oracle Database Version | Directory |
---|---|
Oracle 11g |
/u02/deployments/oracle<##>/network/admin |
Oracle 12c |
/u02/deployments/oracle<##>/network/admin |
Oracle 18c |
/u02/deployments/oracle<##>/network/admin |
Oracle 19c |
/u02/deployments/oracle<##>/network/admin |
Note:
- If you are using Oracle Autonomous product client credentials, then you have to
edit the
tnsnames.ora
file. - If you want your networking directory structure to be consistent with other
Oracle products, you must append
/network/admin
to the directory structure. For this you have to change the environment variableTNS_ADMIN
. For more information on Local Naming Parameters, refer to Database Net Services Reference.
Connecting to Oracle Autonomous Data Warehouse/Autonomous Transaction Processing
You can replicate data to Oracle Autonomous Data Warehouse Cloud Service (ADWCS) or Autonomous Transaction Processing (ATP) by using Oracle GoldenGate Classic on Oracle Cloud Marketplace. The steps described in this section, streamlines the approach for making a remote connection to Oracle Autonomous Database Warehouse Cloud Service (ADWCS).
For more information, refer to Replicating Data to the Autonomous Database section of Using Oracle GoldenGate for Oracle Database guide.
Use Oracle GoldenGate Classic to replicate data to the Autonomous Data Warehouse for:
- Real-time Data Warehousing
- Operational Reporting
Prerequisites:
Ensure to have the following prerequisites before replicating data to Autonomous Data Warehouse:
- Oracle GoldenGate Classic
- Oracle Autonomous Data Warehouse Cloud Service
- Your source database
To deliver data to the Autonomous Database using Oracle GoldenGate Classic, perform the following tasks:
- Configure the Autonomous Data Warehouse for Replication
- Autonomous Database Client Credentials
- Configure Oracle Goldengate Classic for Replication
Perform the following steps for establishing a successful connection to the Autonomous Data Warehouse with Oracle GoldenGate Classic.
Configure the Autonomous Data Warehouse for Replication
Unlock the Pre-created Oracle GoldenGate User (ggadmin)
Perform the following steps to configure the Autonomous Data Warehouse for Replication:
- Unlock and change the password for the pre-created Oracle GoldenGate user (ggadmin) within the Autonomous Data Warehouse. Use any SQL client tool to unlock the account.
For more details, refer to About Connecting to an Autonomous Data Warehouse Instance section of Using Oracle Autonomous Data Warehouse guide.
SQL> select * from dba_users order by username; SQL> alter user ggadmin identified by <password> account unlock;
- Check whether the parameter
enable_goldengate_replicaton
is set to true. If not, then modify the parameter.SQL> select * from v$parameter where name = 'enable_goldengate_replication'; SQL> alter system set enable_goldengate_replication = true scope=both;
Create Target Schema
Complete the following steps to create schema and target objects that can be used in replication. This schema and associated objects does not support DDL replication.
- Create a new application user/schema. This user/schema stores the target objects for replication.
Note:
appadmin
is an example user.SQL> create user appadmin identified by ******** SQL> grant create session, resource, create view, create table to appadmin; SQL> alter user appadmin quota unlimited on data;
- Connect to the Oracle Autonomous Data Warehouse Cloud database as user/schema and create your application tables.
Autonomous Database Client Credentials
Obtain the Autonomous Database Client Credentials
Note:
If you do not have administrator access to the Autonomous Database, ask your service administrator to download and provide the credential files to you. Once you have the credential files for your Autonomous Database, you should upload the zip file to the Oracle GoldenGate Compute Node.Perform the following steps to obtain the Oracle Autonomous Data Warehouse Cloud account details:
- Log in to your Oracle Autonomous Data Warehouse Cloud account.
- From the
Instance
page, click the menu option for the Autonomous Database instance and selectService Console
. - Log in to the Service Console using the admin username, and its associated password.
- In the
Service Console
, click theAdministration
tab. - Click
Download Client Credentials
. - Enter a password to secure your credentials zip file and click
Download
. - Save the credentials zip file to your local system.
Move Client Credentials to Oracle GoldenGate Compute Node
In order to establish a connection from Oracle GoldenGate to the Autonomous Data Warehouse, you need to move the client credentials to Oracle GoldenGate Compute Node. The following steps will illustrate how to move the credential zip file from your machine to Oracle GoldenGate Compute Node.
- Connect to the Oracle GoldenGate Classic Compute Node using SSH and
opc
user credentials.ssh -i <private_key> opc@<public_ip_address>
- Create a staging directory and grant the essential permissions and then exit the session.
$ mkdir stage $ exit
- Copy the credentials zip file to the Oracle GoldenGate Classic Compute
Node.
$ scp ./<credential_file>.zip opc@<public_id_address>:~/stage
- Connect to the Oracle GoldenGate Classic Compute
Node.
ssh -i <private_key> opc@<public_ip_address>
- Verify whether the credentials zip file is available in the stage location.
$ cd ~/stage $ ls -ltr
Configure Oracle Goldengate Compute Node with Autonomous Client Credentials
After moving the ADWC Client Credentials to the Oracle GoldenGate Compute Node, you have to install the necessary files and ensure you have a connection to the Autonomous Data Warehouse. The following steps will help you configure the required SQL*Net components:
- Log in to the Oracle GoldenGate Classic Compute Node using SSH and the
opc
user credentials.ssh -i <private_key> opc@<public_ip_address>
- Unzip the client credentials file into a temporary
directory.
unzip ./<credential_file>.zip -d ./client_credentials
- Copy the
sqlnet.ora
andtnsnames.ora
files to the location of your TNS_ADMIN.$ cd ~/stage/client_credentials $ cp ./sqlnet.ora /u02/deployments/<deployment>/etc $ cp ./tnsnames.ora /u02/deployments/<deployment>/etc
Note:
If you want your networking directory structure to be consistent with other Oracle products, you must append/network/admin
to the directory structure. For this you have to change the environment variableTNS_ADMIN
. For more information on Local Naming Parameters, refer to Database Net Services Reference. - Edit the
sqlnet.ora
file and replace the directory parameter with the location of the information pointing to the location where the client credentials were unzipped.$ cd /u02/deployments/<deployment>/etc $ vi ./sqlnet.ora
Change
?/network/admin
to/home/opc/stage/client_credentials
. - For testing purposes, set the
TNS_ADMIN
andORACLE_HOME
environment variables at the operating system level.Note:
The Oracle GoldenGate Deployment(s) use theORACLE_HOME
andTNS_ADMIN
environment variables that are set per deployment.$ export ORACLE_HOME=/u01/app/client/<oracle version> $ export TNS_ADMIN=/u02/deployments/<deployment>/etc
- Test the connection to Autonomous Data Warehouse by connecting to one of the entries in the
tnsnames.ora
file.$ cd $ORACLE_HOME/bin $ ./sqlplus appadmin/**********@orcladw_low
Configure Oracle Goldengate Classic for Replication
Perform the following steps for establishing a successful connection to the Autonomous Data Warehouse with Oracle GoldenGate Classic.
Add Oracle GoldenGate Credential to connect to Autonomous Data Warehouse
To add Oracle GoldenGate Credential details, to connect to Autonomous Data Warehouse:
- Log into the Oracle GoldenGate Compute Node.
$ ssh -i <private key> opc@<public_ip_address>
- Navigate to
/usr/local/bin
and executeggsci
.$ cd /usr/local/bin $ ggsci oracle<##>
- Add the credential store to the
configuration.
ggsci> add credentialstore
- Alter the credential store to add the required login credentials.
ggsci > alter credentialstore add user <user_id>@<tnsnames_string> password ******** alias <alias_name> domain OracleGoldenGate
- Log in to the autonomous database to test the connection.
ggsci > dblogin useridalias <alias_name> domain OracleGoldenGate