One of the prerequisites for Oracle GoldenGate replication is to enable TRANDATA for the tables or whole schema. For other prerequisites, installation and complete process see here.
Examples of both are shown below.
Use ADD TRANDATA to enable Oracle GoldenGate to acquire the transaction
information that it needs from the transaction records. This can be done by
either ggsci or sqlplus command prompts.
1 2 | ggsci 1> dblogin userid ggs_dba Password ggs_dba ggsci 2> add trandata SCHEMA.TABLE_NAME |
To specify an unconditional supplemental log group for PRIMARY KEY column(s):
SQL > ALTER TABLE SCHEMA .TABLE_NAME ADD SUPPLEMENTAL LOG DATA ( PRIMARY KEY ) COLUMNS; |
SQL > ALTER TABLE SCHEMA .TABLE_NAME ADD SUPPLEMENTAL LOG DATA ( ALL ) COLUMNS; |
SQL> ALTER TABLE SCHEMA .TABLE_NAME ADD SUPPLEMENTAL LOG GROUP t1_g1 (C1,C2) ALWAYS; |
See this oracle documentation link for more details on why and how supplemental logging has to be
enabled.
One can also use ADD SCHEMATRANDATA to enable supplemental logging
for the whole schema and use exclusion parameter to exclude objects that are
not required to be replicated. More about ADD SCHEMATRANDATA can be seen in this oracle documentation link
1 2 3 4 5 | GGSCI (source) 3> add trandata sdas.ogg_test 2015-08-06 10:08:53 WARNING OGG-00869 No unique key is defined for table OGG_TEST. All viable columns will be used to represent the key, but may not guarantee uniqueness. KEYCOLS may be used to define the key. Logging of supplemental redo data enabled for table SDAS.OGG_TEST. |
1 2 3 4 5 6 7 | SQL> alter table sdas.ogg_test drop SUPPLEMENTAL LOG GROUP GGS_OGG_TEST_39719; Table altered. SQL> alter table sdas.ogg_test add constraint ogg_test_pk primary key (emp_id) using index ; Table altered. |
1 2 3 | GGSCI (source) 5> add trandata sdas.ogg_test Logging of supplemental redo data enabled for table SDAS.OGG_TEST. |
Happy OGG set up!!
I really appreciate information shared above. It’s of great help. If someone want to learn Online (Virtual) instructor lead live training in Oracle Golden Gate, kindly contact us http://www.maxmunus.com/contact
ReplyDeleteMaxMunus Offer World Class Virtual Instructor led training on in Oracle Golden Gate. We have industry expert trainer. We provide Training Material and Software Support. MaxMunus has successfully conducted 100000+ trainings in India, USA, UK, Australlia, Switzerland, Qatar, Saudi Arabia, Bangladesh, Bahrain and UAE etc.
For Demo Contact us.
Nitesh Kumar
MaxMunus
E-mail: nitesh@maxmunus.com
Skype id: nitesh_maxmunus
Ph:(+91) 8553912023
http://www.maxmunus.com/
I really appreciate information shared above. It’s of great help. If someone want to learn Online (Virtual) instructor lead live training in Oracle Golden Gate.kindly contact us http://www.maxmunus.com/contact
ReplyDeleteMaxMunus Offer World Class Virtual Instructor led training on Oracle Golden Gate. We have industry expert trainer. We provide Training Material and Software Support. MaxMunus has successfully conducted 100000+ trainings in India, USA, UK, Australlia, Switzerland, Qatar, Saudi Arabia, Bangladesh, Bahrain and UAE etc.
For Free Demo Contact us:
Name : Arunkumar U
Email : arun@maxmunus.com
Skype id: training_maxmunus
Contact No.-+91-9738507310
Company Website –http://www.maxmunus.com
mulesoft training
ReplyDeleteweb methods training
business analyst online training
oracle adf online training
oracle rac online training