Please see my other blog for Oracle EBusiness Suite Posts - EBMentors

Search This Blog

Note: All the posts are based on practical approach avoiding lengthy theory. All have been tested on some development servers. Please don’t test any post on production servers until you are sure.

Sunday, December 05, 2010

Live Reporting with Data Pump -GG

Please review Live Reporting with OGG first.


We can add a data pump to add storage flexibility and to offload the overhead of filtering and conversion processing from the source system. In this configuration, the primary Extract writes to a local data pump and trail, and then the data pump sends the data to a remote trail . A data pump on the intermediary system reads the trail and moves the data to a remote trail on the target, which is read by a Replicat group.
The data pump on the source system is optional, but will help to protect against data loss in the event of a network outage.

Source System
 Configure Primary Extract
GGSCI (HOME-03-DB12) 31> ADD EXTRACT EXTPRRPT, tranlog, begin now
EXTRACT added.

GGSCI (HOME-03-DB12) 68> ADD EXTTRAIL D:\Temp\GG\GG_SOURCE_HOMEDEV_ONSRV1\dirdat\lt, EXTRACT EXTPRRPT
EXTTRAIL added.
This is the local trail on the source system where the Extract process will write to and which is then read by the Data Pump process. We link this local trail to the Primary Extract group

-- Create the parameter file for primary Extract group.
GGSCI (HOME-03-DB12) 31> edit params extrptpr
-- Identify the Extract group:
EXTRACT extrptpr
-- Specify database login information as needed for the database (source):
USERID ggs_owner@homedev, PASSWORD ggs_owner;
-- Specify the local trail on the source system:
EXTTRAIL D:\Temp\GG\GG_SOURCE_HOMEDEV_ONSRV1\dirdat\lt
--Specify transaction log options
TRANLOGOPTIONS ALTARCHIVELOGDEST PRIMARY W:\DEST_1;
TRANLOGOPTIONS ALTARCHIVEDLOGFORMAT HOMEDEV_%S_%R.%T.ARC;
TRANLOGOPTIONS PATHMAP D:\ORACLE\PRODUCT\10.2.0\ORADATA\HOMEDEV\HOMEDEV U:\HOMEDEV\HOMEDEV
-- Specify tables to be captured:
TABLE scott.emp; -- you can put the scott.* if you want to include all the tables.


Configure data pump
Add EXTRACT for data pump. Use EXTTRAILSOURCE as the data source option, and specify the name of the local trail. 
GGSCI (HOME-03-DB12) 37> ADD EXTRACT extdpump, EXTTRAILSOURCE D:\Temp\GG\GG_SOURCE_HOMEDEV_ONSRV1\dirdat\lt, BEGIN now
EXTRACT added.

Use the ADD RMTTRAIL command to specify a remote trail that will be created on remote or  the intermediary system. Use the EXTRACT argument to link the remote trail to the extdpump data pump group. The linked data pump writes to this trail.

GGSCI (HOME-03-DB12) 38> ADD RMTTRAIL Y:\dirdat\rt, EXTRACT extdpump
RMTTRAIL added.
GGSCI (HOME-03-DB12) 39> edit params extdpump
EXTRACT extdpump
USERID ggs_owner@homedev, PASSWORD ggs_owner
RMTHOST HOME-03-DB12, MGRPORT 7809;
--RMTTRAIL to specify the location of the remote trail and associate the same with the Data Pump group as --it will be wriiten to over the network by the data pump process
RMTTRAIL Y:\dirdat\rt;
PASSTHRU
TABLE scott.emp;To use PASSTHRU mode, the names of the source and target objects must be identical. No column mapping, filtering, SQLEXEC functions, transformation, or other functions that require data manipulation can be specified in the parameter file.

Target System
On target system add the replicat group.
GGSCI (HOME-03-DB12) 30> ADD REPLICAT reprptdp, EXTTRAIL Y:\dirdat\rt, begin now
REPLICAT added.
Edit parameter for replicat group
GGSCI (HOME-03-DB12) 31> edit params reprptdp
REPLICAT reprptdp
ASSUMETARGETDEFS
USERID ggs_owner@asmdb, PASSWORD ggs_owner
MAP scott.EMP, TARGET scott.EMP;

Source System
GGSCI (HOME-03-DB12) 40> start extrptdp
Sending START request to MANAGER ...
EXTRACT EXTRPTDP starting
GGSCI (HOME-03-DB12) 41> start extdpump
Sending START request to MANAGER ...
EXTRACT EXTDPUMP starting


Target System
GGSCI (HOME-03-DB12) 10> start replicat reprptdp

Now change some data on source (EMP) and observe the change on target


NOTE:I've used the same machine (Win200364bit) for source and target system. I emulated this as having two different folders for GG source and target.
 

No comments: