Oracle GoldenGate学习之--AIX 系统安装配置系统环境操作系统:AIX5.3-09DB Soft: Oracle 10gR2如下图所示: 系统环境实在aiX系统上构建
Oracle GoldenGate学习之--AIX 系统安装配置
系统环境
操作系统:AIX5.3-09
DB Soft: Oracle 10gR2
如下图所示:
系统环境实在aiX系统上构建单向OGG
下载OGG:
Http://www.oracle.com/technetwork/cn/middleware/Goldengate/downloads/index.html
一、安装OGG
1、解压安装ogg
在AIX211主机配置安装ogg:
[root@aix21ogg]#ls
ogg112101_ggs_AIX_ppc_ora10.2_64bit.zip
[root@aix211 ogg]#unzip ogg112101_ggs_AIX_ppc_ora10.2_64bit.zip
ArcHive: ogg112101_ggs_AIX_ppc_ora10.2_64bit.zip
inflating: ggs_AIX_ppc_ora10.2_64bit.tar
inflating: OGG_WinUnix_Rel_Notes_11.2.1.0.1.pdf
inflating: Oracle GoldenGate 11.2.1.0.1 README.doc
inflating: Oracle GoldenGate 11.2.1.0.1 README.txt
[root@aix211 ogg]#ls
OGG_WinUnix_Rel_Notes_11.2.1.0.1.pdf ggs_AIX_ppc_ora10.2_64bit.tar
Oracle GoldenGate 11.2.1.0.1 README.doc lost+found
Oracle GoldenGate 11.2.1.0.1 README.txt ogg112101_ggs_AIX_ppc_ora10.2_64bit.zip
[root@aix211 ogg]#tar xvf ggs_AIX_ppc_ora10.2_64bit.tar
x .
x ./mgr, 4421047 bytes, 8635 tape blocks
x ./ggsci, 5779790 bytes, 11289 tape blocks
x ./gGCmd, 2871133 bytes, 5608 tape blocks
x ./ggMessage.dat, 1257280 bytes, 2456 tape blocks
x ./help.txt, 169753 bytes, 332 tape blocks
x ./tcperrs, 759 bytes, 2 tape blocks
x ./bcrypt.txt, 1725 bytes, 4 tape blocks
x ./libxml2.txt, 1668 bytes, 4 tape blocks
x ./zlib.txt, 1476 bytes, 3 tape blocks
x ./freeBSD.txt, 1968 bytes, 4 tape blocks
x ./notices.txt, 213535 bytes, 418 tape blocks
x ./libxerces-c.a, 9209080 bytes, 17987 tape blocks
x ./libicui18n38.a, 9302329 bytes, 18169 tape blocks
x ./libicuuc38.a, 6302602 bytes, 12310 tape blocks
x ./libicudata38.a, 15580952 bytes, 30432 tape blocks
x ./libantlr3c.so, 260012 bytes, 508 tape blocks
......
2、创建ogg缺省目录
[root@aix211 ogg]#./ggsci
Could not load program ./ggsci:
Dependent module libclntsh.so could not be loaded.
Could not load module libclntsh.so.
System error: No such file or directory
出现以上错误!
[root@aix211 /]#chown -R oracle:dba /ogg
[root@aix211 ogg]#su - oracle
[oracle@aix211 ~]$cd /ogg
[oracle@aix211 ogg]$./ggsci
Oracle GoldenGate Command Interpreter for Oracle
Version 11.2.1.0.1 OGGCORE_11.2.1.0.1_PLATFORMS_120423.0230
AIX 5L, ppc, 64bit (optimized), Oracle 10.2 on Apr 23 2012 07:27:46
Copyright (C) 1995, 2012, Oracle and/or its affiliates. All rights reserved.
GGSCI (aix211) 2> help
GGSCI Command Summary:
Object: Command:
SUBDIRS CREATE
ER INFO, KILL, LAG, SEND, STATUS, START, STATS, STOP
EXTRACT ADD, ALTER, CLEANUP, DELETE, INFO, KILL,
LAG, REGISTER, SEND, START, STATS, STATUS, STOP
UNREGISTER
EXTTRAIL ADD, ALTER, DELETE, INFO
GGSEVT VIEW
MANAGER INFO, SEND, START, STOP, STATUS
MARKER INFO
PARAMS EDIT, VIEW
REPLICAT ADD, ALTER, CLEANUP, DELETE, INFO, KILL, LAG, SEND,
START, STATS, STATUS, STOP
REPORT VIEW
RMTTRAIL ADD, ALTER, DELETE, INFO
TRACETABLE ADD, DELETE, INFO
TRANDATA ADD, DELETE, INFO
SCHEMATRANDATA ADD, DELETE, INFO
CHECKPOINTTABLE ADD, DELETE, CLEANUP, INFO
Commands without an object:
(Database) DBLOGIN, LIST TABLES, ENCRYPT PASSWord, FLUSH SEQUENCE
MININGDBLOGIN
(DDL) DUMPDDL
(Miscellaneous) FC, HELP, HISTORY, INFO ALL, OBEY, SET EDITOR, shell,
SHOW, VERSIONS, ! (note: you must type the word
COMMAND after the ! to display the ! help topic.)
i.e.: GGSCI (sys1)> help ! command
For help on a specific command, type HELP <command> <object>.
Example: HELP ADD REPLICAT
GGSCI (aix211) 3> create subdirs
Creating subdirectories under current directory /ogg
Parameter files /ogg/dirprm: already exists
Report files /ogg/dirrpt: created
Checkpoint files /ogg/dirchk: created
Process status files /ogg/dirpcs: created
sql script files /ogg/dirsql: created
Database definitions files /ogg/dirdef: created
Extract data files /ogg/dirdat: created
Temporary files /ogg/dirtmp: created
Stdout files /ogg/dirout: created
在AIX212安装配置ogg:
[root@aix212@ /]#chown oracle:dba /ogg
[root@aix212@ /]#su - oracle
[u@h@ W]$cd /ogg
[u@h@ W]$bash
[oracle@aix212@ ogg]$./ggsci
Oracle GoldenGate Command Interpreter for Oracle
Version 11.2.1.0.1 OGGCORE_11.2.1.0.1_PLATFORMS_120423.0230
AIX 5L, ppc, 64bit (optimized), Oracle 10.2 on Apr 23 2012 07:27:46
Copyright (C) 1995, 2012, Oracle and/or its affiliates. All rights reserved.
GGSCI (aix212) 1> help
GGSCI Command Summary:
Object: Command:
SUBDIRS CREATE
ER INFO, KILL, LAG, SEND, STATUS, START, STATS, STOP
EXTRACT ADD, ALTER, CLEANUP, DELETE, INFO, KILL,
LAG, REGISTER, SEND, START, STATS, STATUS, STOP
UNREGISTER
EXTTRAIL ADD, ALTER, DELETE, INFO
GGSEVT VIEW
MANAGER INFO, SEND, START, STOP, STATUS
MARKER INFO
PARAMS EDIT, VIEW
REPLICAT ADD, ALTER, CLEANUP, DELETE, INFO, KILL, LAG, SEND,
START, STATS, STATUS, STOP
REPORT VIEW
RMTTRAIL ADD, ALTER, DELETE, INFO
TRACETABLE ADD, DELETE, INFO
TRANDATA ADD, DELETE, INFO
SCHEMATRANDATA ADD, DELETE, INFO
CHECKPOINTTABLE ADD, DELETE, CLEANUP, INFO
Commands without an object:
(Database) DBLOGIN, LIST TABLES, ENCRYPT PASSWORD, FLUSH SEQUENCE
MININGDBLOGIN
(DDL) DUMPDDL
(Miscellaneous) FC, HELP, HISTORY, INFO ALL, OBEY, SET EDITOR, SHELL,
SHOW, VERSIONS, ! (note: you must type the word
COMMAND after the ! to display the ! help topic.)
i.e.: GGSCI (sys1)> help ! command
For help on a specific command, type HELP <command> <object>.
Example: HELP ADD REPLICAT
GGSCI (aix212) 2>
二、数据库配置
源端(AIX212)
1、建立数据的归档模式
SQL> alter database archivelog;
Database altered.
SQL> alter database force logging;
Database altered.
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /u01/arch_orcl
Oldest online log sequence 2
Next log sequence to archive 4
Current log sequence 4
2、创建ogg用户并授权
[oracle@aix212@ ~]$sqlplus '/as sysdba'
SQL*Plus: Release 10.2.0.1.0 - Production on Tue Sep 23 14:46:43 2014
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to an idle instance.
SQL> create tablespace oggtbs
2 datafile
3 '/u01/app/oracle/oradata/orcl/oggtbs1.dbf' size 100m;
Tablespace created.
SQL> create user ogg identified by ogg default tablespace oggtbs;
User created.
SQL> grant connect,resource to ogg;
Grant succeeded.
SQL> grant create session,alter session to ogg;
Grant succeeded.
SQL> grant select any dictionary,select any table to ogg;
Grant succeeded.
SQL> grant alter any table to ogg;
Grant succeeded.
SQL> grant flashback any table to ogg;
Grant succeeded.
SQL> grant execute on dbms_flashback to ogg;
Grant succeeded.
3、创建传输的对象(table)
SQL> conn scott/tiger
Connected.
SQL> create table emp_ogg as select * from emp;
Table created.
SQL> alter table emp_ogg add constraint pk_ogg primary key (empno);
Table altered.
目标端(AIX211)
1、创建ogg用户并授权
SQL> create tablespace oggtbs
2 datafile
3 '/u01/app/oracle/oradata/prod/oggtbs1.dbf' size 100m;
Tablespace created.
SQL> create user ogg identified by ogg default tablespace oggtbs;
User created.
SQL> grant dba to ogg;
Grant succeeded.
创建测试对象
SQL> conn scott/tiger
Connected.
SQL> create table emp_ogg as select * from emp where 1=2;
Table created.
三、配置OGG
源端配置(AIX212)
1、配置mgr
[oracle@ogg aix212]$ ./ggsci
Oracle GoldenGate Command Interpreter for Oracle
Version 11.2.1.0.1 OGGCORE_11.2.1.0.1_PLATFORMS_120423.0230
AIX 5L, ppc, 64bit (optimized), Oracle 10.2 on Apr 23 2012 07:27:46
Copyright (C) 1995, 2012, Oracle and/or its affiliates. All rights reserved.
添加用于capture data change的table
GGSCI (aix212) 4> add trandata scott.emp_ogg
Logging of supplemental redo data enabled for table SCOTT.EMP_OGG.
GGSCI (aix212) 8> delete trandata scott.emp_ogg
Logging of supplemental redo log data disabled for table SCOTT.EMP_OGG.
GGSCI (aix212) 9> add trandata scott.emp_ogg
Logging of supplemental redo data enabled for table SCOTT.EMP_OGG.
查看在table上是否启用了supplemental log
GGSCI (aix212) 11> info trandata scott.emp_ogg
Logging of supplemental redo log data is enabled for table SCOTT.EMP_OGG.
Columns supplementally logged for table SCOTT.EMP_OGG: EMPNO.
GGSCI (aix212) 13> edit params mgr
port 7809
dynamicportlist 7800-8000
autorestart extract *,waitminutes 2,resetminutes 5
编辑mgr参数文件,并写入以上信息!
GGSCI (ogg) 14> start mgr
Manager started.
GGSCI (ogg) 16> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
配置Extract并初始化:
--结束END--
本文标题: Oracle GoldenGate学习之--AIX系统安装配置
本文链接: https://www.lsjlt.com/news/40744.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
下载Word文档到电脑,方便收藏和打印~
2024-05-14
2024-05-14
2024-05-14
2024-05-14
2024-05-14
2024-05-14
2024-05-14
2024-05-14
2024-05-14
2024-05-14
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0