4019/21, 1:13 PM Day 5_Recap docx - Google Docs
Day 5 Recap
Recap of Oracle Coldengate Classic Architecture 19¢ Session 5:
1. Goldengate Initial Load
The process of loading the data initially from source database to
objects.
It directly reads the source tables and then fetches them into arrays
and send the data to the target.
a. Online Change synchronization
It keeps track of ongoing transactional changes while the initial load
is being applied.
b. Options available for Initial load.
1> BXPDP/IMPDP
2> EXPDP/TMPDP with Transportable tablespace
3> RMAN backup and Restore
4> Goldengate Initial Load
¢. Considerations for Goldengate Initial Loa
> Structure of objects to be replicated should be present in target
before initial load.
> Initial load can load data only, but not metadata
> Initial lead is Network dependent.
d. The advantages of using the GoldenGate method are:
> No application downtime required whea used in conju
change synchronization.
> No locking required on source tables
> Support for heterogeneous environments.
> It supports all kinds of objects.
ion with
e. Types of Goldengate initial load.
> Direct Load - This is a standard method of the initial load and
probably the most flexible. The Extract process sends data from the
source database tables directly to the Replicat, which applies the
data using SQL.
hitpsidocs.google.comidocumendtuuTeB7AciIPZZPPIGIBEN'CaYLCLisCagledt 14019/21, 1:13 PM Day 5_Recap docx - Google Docs
> File to Replicat - This is a simple method that allows the Extract
process to write to a file on the target system that Replicat applies
using SQL INSERT statements.
£, Important Parameters for Initial Load:
> SOURCEISTABLE: This tells GoldenGate to extract data directly from
the source database. >> Source side Parameter
> SPECIALRUN: This indicates that replicat will be invoked as soon as
loadl is started on Source. >> Target side Parameter
> ACCESSRULE, PROG *, IPADDR , ALLOW
>> This parameter has to be added in Manager parameter file on Target
side
ugserr.log - All the errors related to process will be logged here. It
is just like a database alert log.
2. Zero downtime Upgradation and migration strategy :
Goldengate gate allows to do zero downtime migration and upgradation
without impacting application transactions . Below are the high-level
steps to achive this :
i) Prepare the environment :
a )Install goldengate for both source and target database as per
compatibity matrix of oracle db version and GG supported version
b) Configure extract and datapump on source and replicat process on target
ii) Start the extract process and start the data pump process on source
iii) Note down SCN of current database
select current_scn from vSdatabase;
iv) Start initail load from source to target till noted sen in step (iii)
v) Start replicate process after scn noted in step (iii).
start replicat aftercsn
In goldengate
SCN- system change number
CSN- commit sequence number
hitpsidocs.google.comidocumendtuuTeB7AciIPZZPPIGIBEN'CaYLCLisCagledt 284019/21, 1:13 PM Day 5_Recap docx - Google Docs
3. Data Filtration and Transformation
+ GoldenGate provides the ability
variety of levels and conditions.
0 select and filter out data based on
b. GoldenGate offers two data filtering options:
>> WHERE clause is the simplest form of selection. This is used for Non
Complex filtering in a TABLE (Extract) or MAP (Replicat) statement
>> FILTER clause is used for Complex filtering. FILTER can select rows and
columns for a given operation, whereas WHERE just selects rows.
4. Few Built in Functions
@STRCMP> String comparision
STR2 >> 1
STR2Z >> 0
STR2 >> -1
where location is not equal to US
@sTREQ
STRI = STR2 >> 1
STRL <> STR2 >> 0
@STRFIND > Finding a string inside a string.
@STRCAT > Concatenate the 2 strings
@STRUP : Converts the string to upper case
DATENOW - Inserts the current time stamp (when the record was inserted) on
> GoldenGate comparison is based on ASCII values.
> Stats can be different among processes and having different stats
doesn't mean that there is a data issue.
1, With Filter clause, by default the conditions are applicable to all DML
statements. You may use combination of below conditions inside filter
statemen
hitpsidocs.google.comidocumendtuuTeB7AciIPZZPPIGIBEN'CaYLCLisCagledt4019/21, 1:13 PM Day 5_Recap docx - Google Docs
On Insert/Ignore Insert
On Update/Ignore Update
On Delete/Ignore Delete
2. If you prefer to apply condition for updates and deletes only for your
replication, you have to use "ignore insert" with the filter clause in
your extract or replicat parameter file.
TABLE pdbl.ggtrainingl.dept1, filter (ignore insert, (@streq(loc, 'US')=1));
MAP pdbi.ggtrainingl.depti TARGET pdb2,ggtraining2.dept2, filter (ignore
insert, (@streq (loc, 'US")=1));
Note: In the above case, condition will be applied to updates and deletes
only, insert will not check the condition and directly applied to target.
Post-session assignment:
1) complete lab setup for both VMs
2) create database instances on both nodes
3) create application schemas and tables
4) Meet DB Prerequisites to setup Goldengate
5) Add supplemental logging
66) Setup Extract,Pump and Replicat processes and check replication flow.
7) Follow AG3
8) Goldengate troubleshooting
9) Follow AG4 and AGS
10) Perform initial load using Goldengate —direct load and file to replicat
11) Follow AG6 for setup of initial Load
12)Data Filteration and transformation
13)Follow AG 7,8 and 9
hitpsidocs.google.comidocumendtuuTeB7AciIPZZPPIGIBEN'CaYLCLisCagledt