Update Feburary 26, 2019
This lab walks you through uni-directional and DDL replication between to database schemas using Goldengate 18.1 Micro services web interface in a Ravello environment.
This lab supports the following use cases:
This lab is in several parts. The first part will setup the Integrated Extract for Oracle GoldenGate 18c Microservices Architecture for a uni-directional configuration using the SOE schema in the OGGOOW181 and OGGOOW182 PDBs.
Open up a browser window in your client VM environment in Ravello or on your laptop using a browser (like Chrome or Firefox) and enter the following URL and port: http://localhost:16000 .
If you’re using the browser on your laptop, change localhost to the Ravello URL or IP Address your instructor gave out at the beginning of the workshop (same one you used for the VNC Session).
You should get a sign on page. Sign in using the username: “oggadmin” and password “Welcome1”.
Note: You will be required to login again. Use the same Administrator account that was used with the Service Manager.
On the last page of the Add Extract process, you are presented with a parameter file. The parameter file is partially filled out, but missing the TABLE parameters. Insert the following list of TABLE parameter values into the parameter file.
DDL INCLUDE ALL;
SOURCECATALOG OGGOOW181
TABLE SOE.*;
[Optional - For your information] You can also include specific table names for capturing the data changes, but extract will skip the create table DDLs. Sample TABLE parameter vales are given below.
DDL INCLUDE ALL;
SOURCECATALOG OGGOOW181
TABLE SOE.ADDRESSES;
TABLE SOE.CUSTOMERS;
TABLE SOE.ORDERS;
TABLE SOE.ORDER_ITEMS;
TABLE SOE.CARD_DETAILS;
TABLE SOE.LOGON;
TABLE SOE.PRODUCT_INFORMATION;
TABLE SOE.INVENTORIES;
TABLE SOE.PRODUCT_DESCRIPTIONS;
TABLE SOE.WAREHOUSES;
TABLE SOE.ORDERENTRY_METADATA;
Once the TABLE statements are added, click Create and Run at the bottom of the page.
The Administration Server page will refresh when the process is done registering the Extract with the database, and will show that the Extract is up and running
This step will walk you through how to setup a Path within the Distribution Server.
Notice the drop down with the values WS, WSS, UDT and OGG. These are the protocols you can select to use for transport. Since you are setting up an unsecure uni-directional replication, make sure you select WS, then provide the following target information:
Hostname: localhost
Port: 17003
Trail File: bb
Domain: OGG
Alias: WSTARGET
Check the Receiver Server for the target database, which will receive the trail from the Distribution Path that you created on the source deployment.
In this lab you will configure the Integrated Replicat for the second deployment.
This step requires a credential store for replicat to connect to target database. Use the TGGATE created in Lab300.
Navigate back to the Overview page on the Administration Server. Here you will begin to create your Integrated Replicat - Click the plus sign ( + ) to open the Add Replicat process.
You are next taken to the Parameter File page. On this page, you will notice that a sample parameter file is provided - You will have to remove the MAP statement (MAP *.*, TARGET *.*;) and replace it with the information below:
MAP OGGOOW181.SOE.CUSTOMERS, TARGET SOE.CUSTOMERS, KEYCOLS(CUSTOMER_ID);
MAP OGGOOW181.SOE.ADDRESSES, TARGET SOE.ADDRESSES, KEYCOLS(ADDRESS_ID);
MAP OGGOOW181.SOE.ORDERS, TARGET SOE.ORDERS, KEYCOLS(ORDER_ID);
MAP OGGOOW181.SOE.ORDER_ITEMS, TARGET SOE.ORDER_ITEMS, KEYCOLS(ORDER_ID,LINE_ITEM_ID);
MAP OGGOOW181.SOE.CARD_DETAILS, TARGET SOE.CARD_DETAILS, KEYCOLS(CARD_ID);
MAP OGGOOW181.SOE.LOGON, TARGET SOE.LOGON;
MAP OGGOOW181.SOE.PRODUCT_INFORMATION, TARGET SOE.PRODUCT_INFORMATION;
MAP OGGOOW181.SOE.INVENTORIES, TARGET SOE.INVENTORIES, KEYCOLS(PRODUCT_ID,WAREHOUSE_ID);
MAP OGGOOW181.SOE.PRODUCT_DESCRIPTIONS, TARGET SOE.PRODUCT_DESCRIPTIONS;
MAP OGGOOW181.SOE.WAREHOUSES, TARGET SOE.WAREHOUSES;
MAP OGGOOW181.SOE.ORDERENTRY_METADATA, TARGET SOE.ORDERENTRY_METADATA;
MAP OGGOOW181.SOE.*, TARGET SOE.*;
Once the parameter file has been updated, click the Create and Run button at the bottom.
Change directory to Lab4 run script start_swingbench_181.sh. This will run for 1 min and you’ll see the message ** Completed Run. ** when finished.
[oracle@OGG181DB183 ~]$ cd ~/OGG181_WHKSHP/Lab4
[oracle@OGG181DB183 Lab4]$ ./start_swingbench_181.sh
Author : Dominic Giles
Version : 2.6.0.1046
Results will be written to results.xml.
Hit Return to Terminate Run...
Time Users
23:41:06 [0/2]
23:41:08 [0/2]
23:41:09 [0/2]
23:41:10 [0/2]
.
.
.
23:42:04 [2/2]
23:42:05 [2/2]
23:42:06 [2/2]
23:42:07 [2/2]
Completed Run.
[oracle@OGG181DB183 Lab4]$
From here you can see the counts and types of transactions against each table. You can scroll through the list.
Next, from the SanFran Admin Server Overview page, click the ** Action ** button by the Replicat (REP1) and click ** Details **.
In this lab we will perform a few DML and DDL operations on source pdb and check if those operations are properly replicated to target database.
Prerequisite: Source and target database should be in sync. Extract, Pump and Replicat should be up and running.
Logon to OGGOOW181 and OGGOOW182 pdbs using SOE user. The password is soe.
[oracle@OGG181DB183 Lab4]$ sqlplus soe/soe@OGGOOW181
SQL*Plus: Release 18.0.0.0.0 - Production on Tue Mar 26 23:02:54 2019
Version 18.3.0.0.0
Copyright (c) 1982, 2018, Oracle. All rights reserved.
Last Successful login time: Tue Mar 26 2019 22:45:14 +00:00
Connected to:
Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production
Version 18.3.0.0.0
SQL>
Create a employee table in OGGOOW181.
SQL> CREATE TABLE EMPLOYEE (
EMP_ID NUMBER(10),
EMP_NAME VARCHAR2(30),
DEPT VARCHAR2(20)
);
Table created.
SQL>
Go to target admin server page (SanFran), click ** Action ** on REP1 and select details option.
Perform few insert operations on source tables in OGGOOW181 pdb database and check if the inserts are replicated to target tables.
SQL> desc employee
Name Null? Type
----------------------------------------- -------- ----------------------------
EMP_ID NUMBER(10)
EMP_NAME VARCHAR2(30)
DEPT VARCHAR2(20)
SQL> insert into employee values(1,'John','Finance');
1 row created.
SQL> insert into employee values(2,'Jeff','Operations');
1 row created.
SQL> insert into employee values(3,'Ena','Marketing');
1 row created.
SQL> insert into employee values(4,'Nadia','IT');
1 row created.
SQL> insert into employee values(5,'Tom','Finance');
1 row created.
SQL> commit;
Commit complete.
SQL>
Perform few updates and deletes operations on source table and check if the operations are replicated to target database.
SQL> select * from employee;
EMP_ID EMP_NAME DEPT
---------- ------------------------------ --------------------
1 John Finance
2 Jeff Operations
3 Ena Marketing
4 Nadia IT
5 Tom Finance
SQL> update employee set emp_name='Mark' where emp_id=5;
1 row updated.
SQL> delete from employee where emp_id=4;
1 row deleted.
SQL> commit;
Commit complete.
SQL>
Execute the below alter commands and verify the statistics on extract and replicat.
SQL> alter table employee rename column dept to dept_name;
Table altered.
SQL> desc employee
Name Null? Type
----------------------------------------- -------- ----------------------------
EMP_ID NUMBER(10)
EMP_NAME VARCHAR2(30)
DEPT_NAME VARCHAR2(20)
SQL> alter table employee modify emp_name varchar2(40);
Table altered.
SQL> desc employee
Name Null? Type
----------------------------------------- -------- ----------------------------
EMP_ID NUMBER(10)
EMP_NAME VARCHAR2(40)
DEPT_NAME VARCHAR2(20)
SQL>
Execute truncate operation on employee table, verify the statistics and count in the target pdb.
SQL> select * from employee;
EMP_ID EMP_NAME DEPT_NAME
---------- ---------------------------------------- --------------------
1 John Finance
2 Jeff Operations
3 Ena Marketing
5 Mark Finance
SQL> truncate table employee;
Table truncated.
SQL> select count(*) from employee;
COUNT(*)
----------
0
SQL>
Execute drop command on the employee table.
SQL> drop table employee;
Table dropped.
Connect to target database. Password is ** soe **.
SQL> connect soe@oggoow182
Enter password:
Connected.
Execute select against the Employee table.
SQL> select * from employee;
select * from employee
*
ERROR at line 1:
ORA-00942: table or view does not exist
The above error is because employee table is not present in the target database. Drop command is executed successfully in target database.
Log on to Admin process screen of SanFran (http://localhost:17001) and stop the Integrared Replicat (REP1) process.
Log on to Admin process screen of Atlanta (http://localhost:16001) and stop the Integrared Extract (EXT1) and Distribution path (SOE2SOE) process.
You have completed lab 400! Great Job!