Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
oracle_12_goldengate_conf_prepare_source [2020/10/26 19:17] – andonovj | oracle_12_goldengate_conf_prepare_source [2020/11/09 19:50] (current) – andonovj | ||
---|---|---|---|
Line 16: | Line 16: | ||
- | So let's get started: | + | So let's get started. You can set supplemental logging in Oracle database in three levels: |
+ | |||
+ | < | ||
+ | SQL> ALTER DATABASE ADD SUPPLEMENTAL LOG DATA; | ||
+ | SQL> ALTER DATABASE FORCE LOGGING; | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | GGSCI> ADD SCHEMATRANDATA schema [ALLCOLS|NOSCHEDULINGCOLS] | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | GGSCI> ADD TRANDATA [container.]schema.table[ALLCOLS|NOSCHEDULINGCOLS] | ||
+ | </ | ||
+ | |||
+ | The commands from the GGSCI are heterogenous, | ||
< | < | ||
Line 75: | Line 90: | ||
* Extract Job <- Reads the redo | * Extract Job <- Reads the redo | ||
* Dump Job <- Takes the information from the previous job and dump it into retail file. | * Dump Job <- Takes the information from the previous job and dump it into retail file. | ||
- | |||
- | Be sure to clean any remaining files: | ||
- | |||
- | <sxh> | ||
- | [oracle@sourceSRV dirdat]$ ls -lart | ||
- | total 8 | ||
- | drwxr-xr-x 29 oracle oinstall 4096 Nov 14 14:35 .. | ||
- | drwxr-x--- | ||
- | </ | ||
- | |||
- | ====Configure Golden Gate==== | ||
Create the configuration file with the same name as you want the JOB name to be called. | Create the configuration file with the same name as you want the JOB name to be called. | ||
===Manager=== | ===Manager=== | ||
- | <sxh bash> | + | <Code:bash|Manager Config> |
[oracle@matar dirprm]$ cat mgr.prm | [oracle@matar dirprm]$ cat mgr.prm | ||
PORT 7809 | PORT 7809 | ||
Line 98: | Line 102: | ||
Autostart Extract EBK* | Autostart Extract EBK* | ||
AUTORESTART Extract *, WaitMinutes 2, Retries 6 | AUTORESTART Extract *, WaitMinutes 2, Retries 6 | ||
- | </sxh> | + | </Code> |
===Extract job: EBKEXT1=== | ===Extract job: EBKEXT1=== | ||
- | <sxh> | + | <Code: |
cat / | cat / | ||
Extract ebkext1 | Extract ebkext1 | ||
Line 115: | Line 119: | ||
Table SCHEMANAME1.* ; | Table SCHEMANAME1.* ; | ||
Table SCHEMANAME2.* ; | Table SCHEMANAME2.* ; | ||
- | </sxh> | + | </Code> |
===DUMP job: EBKDMP1=== | ===DUMP job: EBKDMP1=== | ||
+ | < | ||
cat / | cat / | ||
- | <sxh bash> | ||
Extract EBKDMP1 | Extract EBKDMP1 | ||
USERID ggate, PASSWORD " | USERID ggate, PASSWORD " | ||
Line 128: | Line 132: | ||
Table schema_name1.* ; | Table schema_name1.* ; | ||
Table schema_name2.* ; | Table schema_name2.* ; | ||
- | </sxh> | + | </Code> |
Line 134: | Line 138: | ||
The jobs should be added to the configuration as well using the GoldenGate Software Command Interface(GGSCI) | The jobs should be added to the configuration as well using the GoldenGate Software Command Interface(GGSCI) | ||
- | <sxh> | + | <Code: |
[oracle@sourceSRV dirdat]$ / | [oracle@sourceSRV dirdat]$ / | ||
Line 149: | Line 153: | ||
Successfully logged into database. | Successfully logged into database. | ||
+ | ---Add the Classical Extract | ||
GGSCI (sourceSRV.izb.local as ggate@DBNAME) 2> add extract EBKEXT1, TRANLOG, BEGIN NOW | GGSCI (sourceSRV.izb.local as ggate@DBNAME) 2> add extract EBKEXT1, TRANLOG, BEGIN NOW | ||
EXTRACT added. | EXTRACT added. | ||
+ | ---Create Local Trail and associate it with the Classical Extract | ||
GGSCI (sourceSRV.izb.local as ggate@DBNAME) 5> add exttrail ./ | GGSCI (sourceSRV.izb.local as ggate@DBNAME) 5> add exttrail ./ | ||
EXTTRAIL added. | EXTTRAIL added. | ||
+ | ---Create Data Pump process and associate it with the local trail | ||
GGSCI (sourceSRV.izb.local as ggate@DBNAME) 6> add EXTRACT EBKDMP1, EXTTRAILSOURCE ./dirdat/lt | GGSCI (sourceSRV.izb.local as ggate@DBNAME) 6> add EXTRACT EBKDMP1, EXTTRAILSOURCE ./dirdat/lt | ||
EXTRACT added. | EXTRACT added. | ||
+ | ---Add Remote trail and associate it with the Data pump process | ||
GGSCI (sourceSRV.izb.local as ggate@DBNAME) 7> add RMTTRAIL ./ | GGSCI (sourceSRV.izb.local as ggate@DBNAME) 7> add RMTTRAIL ./ | ||
RMTTRAIL added. | RMTTRAIL added. | ||
+ | ---Add Supplemental logging for the schema | ||
GGSCI (sourceSRV.izb.local as ggate@DBNAME) 8> ADD SCHEMATRANDATA SCHEMANAME1 | GGSCI (sourceSRV.izb.local as ggate@DBNAME) 8> ADD SCHEMATRANDATA SCHEMANAME1 | ||
Line 175: | Line 183: | ||
***************************************************************************************** | ***************************************************************************************** | ||
+ | ---Add supplemental logging for 2nd schema | ||
GGSCI (sourceSRV.izb.local as ggate@DBNAME) 9> add schematrandata SCHEMANAME2 | GGSCI (sourceSRV.izb.local as ggate@DBNAME) 9> add schematrandata SCHEMANAME2 | ||
Line 187: | Line 195: | ||
***************************************************************************************** | ***************************************************************************************** | ||
- | </sxh> | + | </Code> |
Line 194: | Line 202: | ||
- | <sxh> | + | <Code: |
GGSCI (sourceSRV.izb.local as ggate@DBNAME) 10> info all | GGSCI (sourceSRV.izb.local as ggate@DBNAME) 10> info all | ||
Line 224: | Line 232: | ||
EXTRACT | EXTRACT | ||
- | </sxh> | + | </Code> |
Wait them for couple minutes, to assure that they will not end abnormally (ABEND) | Wait them for couple minutes, to assure that they will not end abnormally (ABEND) | ||