One-way Oracle-Oracle Replication Using the GoldenGate Data Pump

Source: Internet
Author: User
Configure the database environment, goldengate users, install goldengate, and perform other operations. Use the Data Pump to configure one-way Oracle-Oracle replication: -- Here I only configure Synchronization

Configure the database environment, goldengate users, install goldengate, and perform other operations. Use the Data Pump to configure one-way Oracle-Oracle replication: -- Here I only configure Synchronization

Configure the database environment, goldengate users, and install goldengate. For more information, see steps 1-4.
Configuration required for Oracle-Oracle one-way replication using the Data Pump: -- Here I only configure to synchronize the test3 table of test3 users.
1. Configure the master database: ##### configure Extract
Perform the following operations in sequence:
Add extract ext3, tranlog, begin now
Add exttrail/u01/ogg/dirdat/bt, extract ext3
-- The bt * file is generated in the local/u01/ogg/dirdat/directory. If PUMP is not used, add exttrail and rmttail to specify the same file, all created trails are targeted ,,

Edit params ext3
In the edit window that appears, write the following:
Extract ext3
Userid ogg, password ogg
Exttrail/u01/ogg/dirdat/bt
Table test3 .*;

##### Configure PUMP-when using the Data PUMP, You need to configure PUMP, which is more than not used.
Run the following command:
Add extract pump3, exttrailsource./dirdat/bt
Add rmttrail/u01/ogg/dirdat/bt, EXTRACT pump3

Edit param pump3
Write the following in the open edit window -- note the path of the file used
Extract pump3
USERID ogg, PASSWORD ogg
PASSTHRU
RMTHOST 192.168.1.213, MGRPORT 7809, compress
Rmttrail/u01/ogg/dirdat/bt
Table test3 .*;
#############################
2. Set edit params for the target database./GLOBAL
Enter the following two lines in the editing window:
GGSCHEMA ogg
CHECKPOINTTABLE ogg. checkpoint

Here, we use the user created for OGG to log on, and pay attention to the comparison between the path and the OGG installation path.
Dblogin userid ogg, password ogg
Add checkpointtable ogg. checkpoint
Add replicat rep3, exttrail/u01/ogg/dirdat/bt, checkpointtable ogg. checkpoint

Edit params rep3
In the pop-up editing window, enter "---" here, only the test3 table of the test3 user is set. -- here, the user and table name are created in the next test.
Replicat rep3
Handlecollisions
ASSUMETARGETDEFS
Userid ogg, password ogg
Discardfile/u01/ogg/dirdat/rep3_discard.txt, append, megabytes 10
Map test3.test3, target test3.test3;
Start the application process of the target database before starting the PUMP and extraction process of the master database.
3. synchronization test: first, create users and tables in the master database and target database. The example is as follows:
Create user test3 identified by test3;
Grant connect, resource to test3;
BYS @ bys1> conn test3/test3
Connected.
TEST3 @ bys1> create table test3 (aa varchar2 (10) primary key );
###############
Source database:
TEST3 @ bys1> set time on
16:52:21 TEST3 @ bys1> select * from test3;
No rows selected
16:52:26 TEST3 @ bys1>
16:53:07 TEST3 @ bys1> insert into test3 values ('is-OK ');
1 row created.
16:53:29 TEST3 @ bys1> commit;
Commit complete.

#####################

Target database:

TEST3 @ bys2> set time on
16:52:30 TEST3 @ bys2> select * from test3;
No rows selected
16:52:34 TEST3 @ bys2>
16:53:33 TEST3 @ bys2> select * from test3;
No rows selected
16:53:34 TEST3 @ bys2> select * from test3;
AA
--------------------
Is-OK

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.