Oracle 11g GoldenGate与Oracle 11g数据同步

1.下载,安装GoldenGate软件(两个节都需要安装)

GoldenGate可从以下信息的得到下载:

点击这个 链接关注 Linux公社官方微信,关注后回复数字142936。即可得到网友的分享密码。

如果取消关注Linux公社公众号,即使再次关注,也将无法提供本服务!

链接:  密码:获得见上面的方法,地址失效请在下面留言。

------------------------------------------分割线------------------------------------------

也可以到Linux公社1号FTP服务器下载

FTP地址:ftp://ftp1.linuxidc.com

用户名:ftp1.linuxidc.com

密码:

在 2017年LinuxIDC.com/4月/Oracle 11g GoldenGate与Oracle 11g数据同步/

下载方法见

------------------------------------------分割线------------------------------------------ 

[oracle@oracleogg ~]$ unzip ogg112101_fbo_ggs_Linux_x64_ora11g_64bit.zip
[oracle@oracleogg ~]$ tar xvf fbo_ggs_Linux_x64_ora11g_64bit.tar -C /u01/glodengate/
[oracle@oracleogg ~]$ cd /u01/glodengate/
[oracle@oracleogg glodengate]$ vim ~/.bash_profile
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0.1/db_1
export ORACLE_SID=oracle11g
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/u01/glodengate/lib    --必须要设置,否则出错

[oracle@oracleogg glodengate]$ ./ggsci
Oracle GoldenGate Command Interpreter for Oracle
Version 11.2.1.0.1 OGGCORE_11.2.1.0.1_PLATFORMS_120423.0230_FBO
Linux, x64, 64bit (optimized), Oracle 11g on Apr 23 2012 08:32:14
Copyright (C) 1995, 2012, Oracle and/or its affiliates. All rights reserved.


GGSCI (oracleogg) 1> create subdirs    --安装glodengate
Creating subdirectories under current directory /u01/glodengate
Parameter files                /u01/glodengate/dirprm: already exists
Report files                  /u01/glodengate/dirrpt: created
Checkpoint files              /u01/glodengate/dirchk: created
Process status files          /u01/glodengate/dirpcs: created
SQL script files              /u01/glodengate/dirsql: created
Database definitions files    /u01/glodengate/dirdef: created
Extract data files            /u01/glodengate/dirdat: created
Temporary files                /u01/glodengate/dirtmp: created
Stdout files                  /u01/glodengate/dirout: created
GGSCI (oracleogg) 2>
[oracle@oracleogg glodengate]$ ls -lF | grep '/$'    --查看glodengate创建的目录
drwxr-x--- 2 oracle oinstall    4096 Apr 23  2012 cfg/
drwxrwxr-x 2 oracle oinstall    4096 Nov 19 19:36 dirchk/    --检查点文件
drwxrwxr-x 2 oracle oinstall    4096 Nov 19 19:36 dirdat/    --extract文件
drwxrwxr-x 2 oracle oinstall    4096 Nov 19 19:36 dirdef/
drwxr-x--- 2 oracle oinstall    4096 Apr 23  2012 dirjar/
drwxrwxr-x 2 oracle oinstall    4096 Nov 19 19:36 dirout/
drwxrwxr-x 2 oracle oinstall    4096 Nov 19 19:36 dirpcs/
drwxr-x--- 2 oracle oinstall    4096 Apr 23  2012 dirprm/    --参数文件目录
drwxrwxr-x 2 oracle oinstall    4096 Nov 19 19:36 dirrpt/    --日志文件
drwxrwxr-x 2 oracle oinstall    4096 Nov 19 19:36 dirsql/    --sql脚本文件
drwxrwxr-x 2 oracle oinstall    4096 Nov 19 19:36 dirtmp/    --临时文件
drwxr-x--- 7 oracle oinstall    4096 Apr 23  2012 UserExitExamples/
[oracle@oracleogg glodengate]$


2.获取语法帮助信息
(1).必须要ggsci根目录进入ggsci终端,否则获取不到帮助信息
(2).帮助语法: help <command> <object>  比如:help add rmttrail
GGSCI (oracleogg) 3> help add rmttrail
ADD RMTTRAIL
Use ADD RMTTRAIL to create a trail for online processing on a remote
system and:
* assign a maximum file size.
* associate the trail with an Extract group.
In the parameter file, specify a RMTHOST entry before any RMTTRAIL
entries to identify the remote system and TCP/IP port for the Manager
process.
Syntax:
 
ADD RMTTRAIL <trail name>, EXTRACT <group name> 
[, MEGABYTES <n>]
[SEQNO <n>]
 
<trail name>
The fully qualified path name of the trail. The actual trail name can
contain only two characters. Oracle GoldenGate appends this name with a
six-digit sequence number whenever a new file is created. For example,
a trail named ./dirdat/tr would have files named
./dirdat/tr000001, ./dirdat/tr000002, and so forth. 
 
<group name>
The name of the Extract group to which the trail is bound. Only one
Extract process can write data to a trail.
 
MEGABYTES <n>
The maximum size, in megabytes, of a file in the trail. The default is
100. 
 
SEQNO <n>
Specifies that the first file in the trail will start with the
specified trail sequence number. Do not include any zero padding. For
example, to start at sequence 3 of a trail named "tr," specify SEQNO 3.
The actual file would be named /ggs/dirdat/tr000003. This option can be
used during troubleshooting when Replicat needs to be repositioned to a
certain trail sequence number. It eliminates the need to alter Replicat
to read the required sequence number.
 
Example:
ADD RMTTRAIL c:\ggs\dirdat\aa, EXTRACT finance, MEGABYTES 200
GGSCI (oracleogg) 4>

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/b49099dd12b6a2782f95b6862b351a81.html