|
Item |
Source System |
Target System |
|
Platform |
RHEL6.4 - 64bit |
RHEL6.4 - 64bit |
|
Hostname |
rhel64.oracle.com |
ora11g.oracle.com |
|
Database |
Oracle 11.2.0.3 |
Oracle 11.2.0.3 |
|
Character Set |
AL32UTF8 |
AL32UTF8 |
|
ORACLE_SID |
PROD |
EMREP |
|
Listener Name/Port |
LISTENER/1521 |
LISTENER/1521 |
|
Goldengate User |
ogg |
ogg |
This Document briefly describes how to replicate data change from local database(Oracle11.2.0.3) to remote database (Oracle11.2.0.3) through Goldengate 11g.
Download URL:
http://www.oracle.com/technetwork/middleware/goldengate/downloads/index.html
Platform: RedHat Enterprise Linux 6.4 x86-64
Choose: Oracle GoldenGate V11.2.1.0.3 for Oracle 11g on Linux x86-64
|
Item |
Source System |
Target System |
|
Platform |
RHEL6.4 |
RHEL6.4 |
|
Hostname |
rhel101.oracle.com |
rhel102.oracle.com |
|
Database |
Oracle 11.2.0.3 |
Oracle 11.2.0.3 |
|
Character Set |
AL32UTF8 |
AL32UTF8 |
|
ORACLE_SID |
PROD |
EMREP |
|
Listener Name/Port |
LISTENER/1521 |
LISTENER/1521 |
|
Goldengate DB Account |
ogg |
ogg |
|
[oracle@rhel101 ~]$ cat .bash_profile export ORACLE_BASE=/u01/app/oracle export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1 export ORACLE_SID=PROD export PATH=$ORACLE_HOME/bin:$PATH export NLS_LANG=AMERICAN_AMERICA.AL32UTF8
alias sqlplus='/usr/local/bin/rlwrap sqlplus' alias rman='/usr/local/bin/rlwrap rman'
|
|
[oracle@rhel102 ~]$ cat .bash_profile export ORACLE_BASE=/u01/app/oracle export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1 export ORACLE_SID=EMREP export PATH=$ORACLE_HOME/bin:$PATH export NLS_LANG=AMERICAN_AMERICA.AL32UTF8
alias sqlplus='/usr/local/bin/rlwrap sqlplus' alias rman='/usr/local/bin/rlwrap rman'
|
在oracle用户的环境变量中增加以下一行:
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$ORACLE_HOME/network/lib
|
[oracle@rhel101 ~]$ vi .bash_profile export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$ORACLE_HOME/network/lib
[oracle@rhel101 ~]$ source .bash_profile
[oracle@rhel101
~]$ echo
$LD_LIBRARY_PATH
|
|
[oracle@rhel102 ~]$ vi .bash_profile export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$ORACLE_HOME/network/lib
[oracle@rhel102 ~]$ source .bash_profile
[oracle@rhel102
~]$ echo
$LD_LIBRARY_PATH
|
For source system(PROD):
|
[oracle@rhel101 ~]$ mkdir -p /u01/app/oracle/ggs/11.2.1 [oracle@rhel101 ~]$ ls -ld /u01/app/oracle/ggs/11.2.1
[oracle@rhel101 ~]$ vi .bash_profile export PATH=/u01/app/oracle/ggs/11.2.1:$:PATH [oracle@rhel101 ~]$ source .bash_profile
|
For target system(EMREP):
|
[oracle@rhel102 ~]$ mkdir -p /u01/app/oracle/ggs/11.2.1 [oracle@rhel102 ~]$ ls -ld /u01/app/ oracle/ggs/11.2.1
[oracle@rhel102 ~]$ vi .bash_profile export PATH=/u01/app/oracle/ggs/11.2.1:$PATH [oracle@rhel102 ~]$ source .bash_profile |
|
[oracle@rhel101 ~]$ cd /u01/app/oracle/ggs/11.2.1/ [oracle@rhel101 11.2.1]$ rz
[oracle@rhel101 11.2.1]$ ls -lh [oracle@rhel101 11.2.1]$ tar -xf fbo_ggs_Linux_x64_ora11g_64bit.tar [oracle@rhel101 11.2.1]$ ls -lh
[oracle@rhel101 11.2.1]$ which ggsci
[oracle@rhel101 11.2.1]$ vi /home/oracle/.bash_profile alias ggsci='/usr/local/bin/rlwrap ggsci' [oracle@rhel101 11.2.1]$ source /home/oracle/.bash_profile |
|
[oracle@rhel102 11.2.1]$ which ggsci
[oracle@rhel102 11.2.1]$ vi /home/oracle/.bash_profile alias ggsci='/usr/local/bin/rlwrap ggsci' [oracle@rhel102 11.2.1]$ source /home/oracle/.bash_profile
|
For both Source system and Target system:
|
[oracle@rhel101 ~]$ cd /u01/app/oracle/ggs/11.2.1/ [oracle@rhel101 11.2.1]$ ggsci Oracle GoldenGate Command Interpreter for Oracle Version 11.2.1.0.3 14400833 OGGCORE_11.2.1.0.3_PLATFORMS_120823.1258_FBO Linux, x64, 64bit (optimized), Oracle 11g on Aug 23 2012 20:20:21
Copyright (C) 1995, 2012, Oracle and/or its affiliates. All rights reserved. GGSCI (rhel101.oracle.com) 1> create subdirs Creating subdirectories under current directory /u01/app/oracle/ggs/11.2.1 Parameter files /u01/app/oracle/ggs/11.2.1/dirprm: already exists Report files /u01/app/oracle/ggs/11.2.1/dirrpt: created Checkpoint files /u01/app/oracle/ggs/11.2.1/dirchk: created Process status files /u01/app/oracle/ggs/11.2.1/dirpcs: created SQL script files /u01/app/oracle/ggs/11.2.1/dirsql: created Database definitions files /u01/app/oracle/ggs/11.2.1/dirdef: created Extract data files /u01/app/oracle/ggs/11.2.1/dirdat: created Temporary files /u01/app/oracle/ggs/11.2.1/dirtmp: created Stdout files /u01/app/oracle/ggs/11.2.1/dirout: created
[oracle@rhel102 ~]$ cd /u01/app/oracle/ggs/11.2.1/ [oracle@rhel102 11.2.1]$ ggsci Oracle GoldenGate Command Interpreter for Oracle Version 11.2.1.0.3 14400833 OGGCORE_11.2.1.0.3_PLATFORMS_120823.1258_FBO Linux, x64, 64bit (optimized), Oracle 11g on Aug 23 2012 20:20:21 Copyright (C) 1995, 2012, Oracle and/or its affiliates. All rights reserved. GGSCI (rhel102.oracle.com) 1> create subdirs Creating subdirectories under current directory /u01/app/oracle/ggs/11.2.1 Parameter files /u01/app/oracle/ggs/11.2.1/dirprm: already exists Report files /u01/app/oracle/ggs/11.2.1/dirrpt: created Checkpoint files /u01/app/oracle/ggs/11.2.1/dirchk: created Process status files /u01/app/oracle/ggs/11.2.1/dirpcs: created SQL script files /u01/app/oracle/ggs/11.2.1/dirsql: created Database definitions files /u01/app/oracle/ggs/11.2.1/dirdef: created Extract data files /u01/app/oracle/ggs/11.2.1/dirdat: created Temporary files /u01/app/oracle/ggs/11.2.1/dirtmp: created
Stdout files /u01/app/oracle/ggs/11.2.1/dirout: created
|
Above directories are created for following purpose:
|
Name |
Purpose |
|
dirchk |
Checkpoint files |
|
dirdat |
GoldenGate trails |
|
dirdef |
Data definition files |
|
dirprm |
Parameter files |
|
dirpcs |
Process status files |
|
dirrpt |
Report files |
|
dirsql |
SQL script files |
|
dirtmp |
Temporary files |
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/29475508/viewspace-2147504/ ,如需转载,请注明出处,否则将追究法律责任。