Target table existence: The target tables should exist on the Synapse database
before replication. As GoldenGate uses Merge SQL Statement, the target table must be
a hash distributed table.
OCI GoldenGate Azure Data Lake Storage Connection assigned to
deployment. If it doesn't exist, create an Azure Data Lake Storage connection and assign to
deployment.
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;
Environment setup: Azure Synapse 🔗
Open Azure Synapse Workspace .
Click New, and then SQL Script.
Connect to your sql pool and select your database.
Enter the following command to create a Master Key Encryption:
CREATE MASTER KEY ENCRYPTION BY PASSWORD='<password>';
Use the following command to create Database Scoped Credential:
Ensure that you replace the
<storage-account-name> and
<storage-account-access-key> placeholders with their
actual
values.
CREATE DATABASE SCOPED CREDENTIAL <credential name>
WITH
IDENTITY='<storage-account-name>',
SECRET='<storage-account-access-key>';
You're returned to the Overview page, where you can review the Replicat details.
Task 5: Verify the
replication 🔗
Perform some updates to the source Autonomous Transaction Processing
instance to verify replication to Azure Data Lake 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.
In the source GoldenGate OCI GoldenGate deployment console, select the Extract
name, and then click Statistics. Verify that
SRC_OCIGGLL.SRC_CUSTOMER has 7 inserts.
Insert into SRC_OCIGGLL.SRC_CUSTOMER (CUSTID,DEAR,LAST_NAME,FIRST_NAME,ADDRESS,CITY_ID,PHONE,AGE,SALES_PERS_ID) values (1001,0,'Brendt','Paul','10 Jasper Blvd.',107,'(212) 555 2146',19,10);
Insert into SRC_OCIGGLL.SRC_CUSTOMER (CUSTID,DEAR,LAST_NAME,FIRST_NAME,ADDRESS,CITY_ID,PHONE,AGE,SALES_PERS_ID) values (1002,0,'McCarthy','Robin','27 Pasadena Drive',11,'(214) 555 3075',29,11);
Insert into SRC_OCIGGLL.SRC_CUSTOMER (CUSTID,DEAR,LAST_NAME,FIRST_NAME,ADDRESS,CITY_ID,PHONE,AGE,SALES_PERS_ID) values (1003,0,'Travis','Peter','7835 Hartford Drive',12,'(510) 555 4448',34,12);
Insert into SRC_OCIGGLL.SRC_CUSTOMER (CUSTID,DEAR,LAST_NAME,FIRST_NAME,ADDRESS,CITY_ID,PHONE,AGE,SALES_PERS_ID) values (1004,0,'Larson','Joe','87 Carmel Blvd.',13,'(213) 555 5095',45,13);
Insert into SRC_OCIGGLL.SRC_CUSTOMER (CUSTID,DEAR,LAST_NAME,FIRST_NAME,ADDRESS,CITY_ID,PHONE,AGE,SALES_PERS_ID) values (1005,0,'Goldschmidt','Tony','91 Torre drive',14,'(619) 555 6529',55,20);
Insert into SRC_OCIGGLL.SRC_CUSTOMER (CUSTID,DEAR,LAST_NAME,FIRST_NAME,ADDRESS,CITY_ID,PHONE,AGE,SALES_PERS_ID) values (1006,0,'Baker','William','2890 Grant Avenue',15,'(312) 555 7040',64,21);
Insert into SRC_OCIGGLL.SRC_CUSTOMER (CUSTID,DEAR,LAST_NAME,FIRST_NAME,ADDRESS,CITY_ID,PHONE,AGE,SALES_PERS_ID) values (1007,0,'Swenson','Jack','64 Imagination Drive',19,'(202) 555 8125',74,22)
In the target Big Data OCI GoldenGate deployment console, select the Replicat
name, and then click Statistics. Verify that
SRC_OCIGGLL.SRC_CUSTOMER has 7 inserts.
In Azure console, navigate to Azure Synapse workspace Console. Run Select *
from dbo.SRC_CUSTOMER and verify that SRC_OCIGGLL.SRC_CUSTOMER has
7 inserts.