Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to deploy goldengate

2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article will give you a detailed explanation on how to deploy goldengate. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.

1. Install redhat4 with brief installation steps

2. Installation steps for oracle10g installation

Third, install goldengate, and be careful to choose the right version

1. Source-side installation configuration

1.1 install goldengate

Linux: mkdir / u01/oracle/ggate

Cd / u01/oracle/ggate

Upload goldengate zip software to / u01/oracle/ggate via ftp

Decompress unzip and generate a tar file

Tar-xvf * .tar

1.2 configure .bash _ profile

Vi .bash _ profile

Add:

Export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/u01/oracle/ggate

Export GGATE_HOME=/u01/oracle/ggate

Note LD_LIBRARY_PATH, which line can be added after the original installation of oracle.

After configuration, run source ~. / bash_profile

1.3 create a goldengate directory

Cd / u01/oracle/ggate

. / ggsci (enter the goldengate command line interface)

Oracle GoldenGate Command Interpreter for Oracle

Version 11.1.1.0.0 Build 078

Linux, x86, 32bit (optimized), Oracle 10 on Jul 28 2010 13:24:18

Copyright (C) 1995, 2010, Oracle and/or its affiliates. All rights reserved

Now working on the goldengate command line

Create subdirs

1.4 configure database archiving mode and enter the sql command line (if closed, it is recommended to turn it on)

Sqlplus "/ as sysdba"

Alter system set log_archive_format='%s_%t_%r.log' scope=spfile

Alter system set log_archive_dest_1='location=/u02/oracle/arc'

Shutdown immediate

Startup mount

Alter database archivelog

Alter database open

Alter database force logging

-cancel the use of alter database no force logging

Now you can see if the filing has been started, archive log list.

1.5 enable minimal supplemental logging

Alter database add supplemental log data (primary key,unique) columns

1.6 close the Recycle Bin

Alter system set recyclebin=off scope=spfile

1.7 configure DDL support for replication

Create user authorization:

Create user ggate identified by ggate default tablespace users temporary tablespace temp quota unlimited on users

Grant connect,resource,dba to ggate

Grant execute on utl_file to ggate

Grant restricted session to ggate

@ $GGATE_HOME/marker_setup.sql

SCHEMA:GGATE

@ $GGATE_HOME/ddl_setup.sql

Here to see clearly, choose input, otherwise there will be a problem!

@ $GGATE_HOME/role_setup.sql

To grant authority to a role:

Grant GGS_GGSUSER_ROLE to ggate

@ $GGATE_HOME/ddl_enable.sql

1.8 create source-side users (users for synchronization)

Create user sender identified by ggate default tablespace users temporary tablespace temp quota unlimited on users

Grant dba,connect,resource to ggate

Grant select on v_$session to ggate

2. Source-side replication queue configuration

2.1 configure manager

Cd / u01/oracle/ggate

. / ggsci (enter the goldengate command line)

Edit params mgr

Input: PORT 7809

Basically the same as vi operation

2.2 configure source-side replication queues

Also do it on the goldengate command line

Add extract ext1, tranlog, begin now

Add exttrail / u01/oracle/ggate/dirdat/lt, extract ext1

Edit params ext1

Enter the following:

Extract ext1

Userid ggate, password ggate

Rmthost target machine, mgrport 7809

Rmttrail / u01/oracle/ggate/dirdat/lt

Ddl include mapped objname sender.*

Table sender.*

Here, you can check it out with info all.

Close the process:

Stop mgr

Stop ext1

Here, the source end is basically configured.

3. Installation and configuration on the target side

3.1 install goldengate

Linux: mkdir / u01/oracle/ggate

Cd / u01/oracle/ggate

Upload goldengate zip software to / u01/oracle/ggate via ftp

Decompress unzip and generate a tar file

Tar-xvf * .tar

3.2 configure .bash _ profile

Vi .bash _ profile

Add:

Export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/u01/oracle/ggate

Export GGATE_HOME=/u01/oracle/ggate

Note LD_LIBRARY_PATH, which line can be added after the original installation of oracle.

After configuration, run source ~. / bash_profile

3.3.Create goldengate directory

Cd / u01/oracle/ggate

. / ggsci (enter the goldengate command line interface)

Oracle GoldenGate Command Interpreter for Oracle

Version 11.1.1.0.0 Build 078

Linux, x86, 32bit (optimized), Oracle 10 on Jul 28 2010 13:24:18

Copyright (C) 1995, 2010, Oracle and/or its affiliates. All rights reserved

Now working on the goldengate command line

Create subdirs

3.4 create the target end user

Create user ggate identified by ggate default tablespace users temporary tablespace temp quota unlimited on users

Create user receiver identified by ggate default tablespace users temporary tablespace temp quota unlimited on users; (user receiving synchronization)

Grant connect,resource,dba to ggate

Grant execute on utl_file to ggate

Grant restricted session to ggate

Grant connect,resource,dba to receiver

Grant select on v_$session to receiver

3.5 configure replicat

. / ggsci

Edit params. / GLOBALS

Enter:

GGSCHEMA ggate

CHECKPOINTTABLE ggate.checkpoint

Edit params mgr

Input: PORT 7809

Log in to the database on the goldengate command line

Dblogin userid ggate,password ggate

Add checkpointtable ggate.checkpoint (additional detection points)

Add replicat rep1, exttrail / u01/oracle/ggate/dirdat/lt, checkpointtable ggate.checkpoint (add different queues)

Edit params rep1

Add the following:

Replicat rep1

ASSUMETARGETDEFS

Userid ggate, password ggate

Discardfile / u01/oracle/ggate/dirdat/rep1_discard.txt, append, megabytes 10

DDL include all

Map sender.*, target receiver.*

At this point, the superscript end configuration is basically finished.

Fourth, an additional step, which I do.

Increase on the source side and the destination side, respectively.

Mkdir-p / u01/oracle/ggate/dirdat/lt

Open it on the goldengate command line

Source: start manager

Start ext1

Target: start manager

Start rep1

VI. Testing:

Source: create table sender.test (empid number (4), names varchar2 (10), oldage number (3))

Target: select * from receiver.test

This is the end of the article on "how to deploy goldengate". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report