Environment set up: Autonomous Transaction Processing 🔗
If you don't already have a source database set up for replication, you
can follow these steps to load a sample schema to use for this quickstart. This
quickstart uses Autonomous Transaction Processing for the source database.
In the Oracle Cloud console, select your Autonomous Transaction Processing (ATP) instance from
the Autonomous Databases page to view its details and access Database
Actions.
Unlock the GGADMIN user:
Click Database actions, then click Database
Users.
Locate GGADMIN and then click its ellipsis menu (three dots) and select
Edit.
In the Edit User panel, enter the GGADMIN password, confirm the
password, and then deselect Account is Locked.
Click Apply Changes.
Load the source sample schema and data:
From the Database actions menu, under Development, select
SQL.
Copy and paste the script from
OCIGGLL_OCIGGS_SETUP_USERS_ATP.sql into the SQL
worksheet.
Click Run Script. The Script Output tab displays confirmation
messages.
Clear the SQL worksheet and then copy and paste the SQL script from
OCIGGLL_OCIGGS_SRC_USER_SEED_DATA.sql.
Tip:
You may need to run each statement separately for the
SQL tool to execute the scripts successfully.
To verify that the tables were created successfully, close the SQL
window and reopen it again. In the Navigator tab, look for the
SRC_OCIGGLL schema and then select tables from
their respective dropdowns.
Enable supplemental logging:
Clear the SQL Worksheet.
Enter the following statement, and then click Run
Statement:
ALTER PLUGGABLE DATABASE ADD SUPPLEMENTAL LOG DATA;
Task 1: Create the OCI GoldenGate resources
🔗
This quickstart example requires deployments and connections for both
the source and target.
To use
the formatting property for OCI Object Storage, replace
name with oci. For
example, gg.handler.name.format
becomes
gg.handler.oci.format.
gg.handler.oci.inactivityRollInterval:
GoldenGate creates a file and keeps it open for writing.
This property closes the file after the designated period of
inactivity (no incoming transactions), and then loads it
into OCI Object Storage. By default, it is set to 5 seconds.
You can specify a time in milliseconds (ms), seconds (s),
minutes (m), or hours (h). For example,
gg.handler.oci.inactivityRollInterval=10m.
gg.handler.oci.maxFileSize:
File Writer Handler opens the file and keeps it open until
it reaches the maximum file size, assuming there are no
metadata changes. By default, the maximum file size is 1 GB,
however you can change it using this property. When the size
is reached, file is closed, and a new file is generated. For
example,
gg.handler.oci.maxFileSize=500m.
gg.handler.oci.rollOnShutdown:
The default value is true. When set to true, GoldenGate
shuts the open file when you stop the Replicat process. By default, File Writer Handler
keeps the file open even if the Replicat stops and continues writing to the same
file when the Replicat restarts. For
example,
gg.handler.oci.rollOnShutdown=false
gg.handler.oci.fileRollInterval:
Designates the amount of time to keep the file open before
it's closed and rolls over to a new file. By default it is
set to 7 minutes. You can specify a time in milliseconds
(ms), seconds (s), minutes (m), or hours (h). For example,
gg.handler.oci.fileRollInterval=10m.
gg.eventhandler.oci.bucketMappingTemplate:
Enter the Object Storage bucket name.
Click Create and Run.
Task 5: Verify the
replication 🔗
Perform some updates to the source Autonomous Transaction Processing instance to
verify replication to OCI Object Storage.
In the Oracle Cloud console, open the navigation menu, select Oracle
Database, and then select Autonomous Transaction
Processing.
In the list of Autonomous Transaction Processing instances, select your source instance
to view its details.
On the database details page, click Database actions.
Note
You should be automatically logged
in. If not, log in with the database credentials.
On the Database actions home page, select SQL.
Enter the following into the worksheet and click Run
Script.
Insert into SRC_OCIGGLL.SRC_CITY (CITY_ID,CITY,REGION_ID,POPULATION) values (1000,'Houston',20,743113);
Insert into SRC_OCIGGLL.SRC_CITY (CITY_ID,CITY,REGION_ID,POPULATION) values (1001,'Dallas',20,822416);
Insert into SRC_OCIGGLL.SRC_CITY (CITY_ID,CITY,REGION_ID,POPULATION) values (1002,'San Francisco',21,157574);
Insert into SRC_OCIGGLL.SRC_CITY (CITY_ID,CITY,REGION_ID,POPULATION) values (1003,'Los Angeles',21,743878);
Insert into SRC_OCIGGLL.SRC_CITY (CITY_ID,CITY,REGION_ID,POPULATION) values (1004,'San Diego',21,840689);
Insert into SRC_OCIGGLL.SRC_CITY (CITY_ID,CITY,REGION_ID,POPULATION) values (1005,'Chicago',23,616472);
Insert into SRC_OCIGGLL.SRC_CITY (CITY_ID,CITY,REGION_ID,POPULATION) values (1006,'Memphis',23,580075);
Insert into SRC_OCIGGLL.SRC_CITY (CITY_ID,CITY,REGION_ID,POPULATION) values (1007,'New York City',22,124434);
Insert into SRC_OCIGGLL.SRC_CITY (CITY_ID,CITY,REGION_ID,POPULATION) values (1008,'Boston',22,275581);
Insert into SRC_OCIGGLL.SRC_CITY (CITY_ID,CITY,REGION_ID,POPULATION) values (1009,'Washington D.C.',22,688002);
In the source ATP deployment console, select the Extract name, and then click
Statistics. Verify that SRC_OCIGGLL.SRC_CITY has 10
inserts.
In the target Big Data OCI GoldenGate deployment console, select the Replicat name,
and then click Statistics. Verify that
SRC_OCIGGLL.SRC_CITY has 10 inserts.
In the Oracle Cloud console, navigate to the OCI Object Storage
bucket and check its contents.