Oracle GoldenGate Install For Linux
来源:互联网 发布:淘宝淘抢购 编辑:程序博客网 时间:2024/05/20 04:08
DownLoad:
http://edelivery.oracle.com
Prepare(Source And Target DB):
useradd ogg -g oinstallAdd Environment Variblevi /home/oracle/.bash_profileexport LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/oggConfigure Databasealter database archivelog;alter database force logging;alter database add supplemental log data (primary key ,unique index) columns;select SUPPLEMENTAL_LOG_DATA_MIN, SUPPLEMENTAL_LOG_DATA_PK,SUPPLEMENTAL_LOG_DATA_UI from v$database;ALTER SYSTEM SET recyclebin = OFF scope=spfile; for Oracle 11g ,need to be restartCreate OGG User:sqlplus / as sysdbacreate user ogg identified by ogg;grant dba to ogg;GGSCI (zbdba1) 1> edit params ./GLOBALGGSCHEMA oggCHECKPOINTTABLE ogg.checkpointInstalling the DDL objects:1、Run the @marker_setup.sql script. This script installs support for the Oracle GoldenGatemarker system, which is required for DDL support. You will be prompted for the nameof the Oracle GoldenGate schema.drop trigger ggs_ddl_trigger_before;2、Run the @ddl_setup.sql script Script that installs the Oracle GoldenGate DDL extraction andreplication objects. (Oracle installations)3、Run the @role_setup.sql script. This script drops and creates the role needed for DDLsynchronization. It grants DML permissions on the Oracle GoldenGate DDL objects4、Grant the role to all Oracle GoldenGate Extract users. You may need to make multiplegrants if the processes have different user names.Run the @ddl_enable.sql script to enable the DDL trigger.5、To improve the performance of the DDL trigger, make the ddl_pin script part of the databasestartup. It must be invoked with the Oracle GoldenGate DDL user name, as in:@?/rdbms/admin/dbmspool.sqlSQL> @ddl_pin oggTo improve the performance of the DDL trigger This script pins the PL/SQL package that is used by the trigger into memory. If executingthis script from SQL*Plus, connect as SYSDBA from the Oracle GoldenGate home directory.This script relies on the Oracle dmbs_shared_pool system package, so install that packagebefore using ddl_pin.
Source DB:
MANAGERGGSCI (zbdba1) 1> create subdirsGGSCI (zbdba1) 22> view param mgrport 7839DYNAMICPORTLIST 7840-7914USERID OGG,PASSWORD oggAUTORESTART EXTRACT *, RETRIES 5, WAITMINUTES 3PURGEOLDEXTRACTS ./DIRDAT/*,MINKEEPDAYS 3PURGEDDLHISTORY MINKEEPDAYS 7,MAXKEEPDAYS 10,FREQUENCYMINUTES 30PURGEMARKERHISTORY MINKEEPDAYS 7,MAXKEEPDAYS 10LAGREPORTHOURS 1LAGINFOMINUTES 30LAGCRITICALMINUTES 45
GGSCI (zbdba1) 3> dblogin userid ogg,password ogg;Successfully logged into database.GGSCI (zbdba1) 1> add trandata zbdba.* EXTRACTGGSCI (zbdba1) 1> dblogin userid ogg,password oggadd extract ext1,tranlog, begin nowadd exttrail /ogg/dirdat/sa extract ext1.add rmttrail ./dirdat/sa,extract ext1GGSCI (zbdba1) 9> view param ext1EXTRACT EXT1setenv ( NLS_LANG = AMERICAN_AMERICA.ZHS16GBK )USERID ogg,PASSWORD oggDDL &INCLUDE MAPPED OBJTYPE 'TABLE' &INCLUDE MAPPED OBJTYPE 'IDNEX' &INCLUDE MAPPED OBJTYPE 'SEQUENCE' &INCLUDE MAPPED OBJTYPE 'VIEW' &INCLUDE MAPPED OBJTYPE 'PROCEDURE' &INCLUDE MAPPED OBJTYPE 'FUNCTION' &INCLUDE MAPPED OBJTYPE 'PACKAGE' &INCLUDE MAPPED OBJTYPE 'MATERIALIZED VIEW' &EXCLUDE OPTYPE COMMENTDDLOPTIONS ADDTRANDATA NOCROSSRENAME REPORTREPORTCOUNT EVERY 1 MINUTES,RATEDISCARDFILE ./dirrpt/EXTSA.DSC,APPEND,MEGABYTES 1024THREADOPTIONS MAXCOMMITPROPAGATIONDELAY 60000 IOLATENCY 60000DBOPTIONS ALLOWUNUSEDCOLUMNWARNLONGTRANS 2H,CHECKINTERVAL 3Mexttrail ./dirdat/saFETCHOPTIONS NOUSESNAPSHOT,FETCHPKUPDATECOLS,MISSINGROW REPORTtable zbdba.*;datapumpGGSCI (zbdba1) 4>> add extract ext2,exttrailsource /ogg/dirdat/saEXTRACT added. ADD EXTTRAIL/RMTTRAIL ./dirdat/sa, EXTRACT EXT2GGGSCI (zbdba1) 4> add rmttrail /ogg/dirdat/sa, extract ext2RMTTRAIL added.GGSCI (zbdba1) 2> view param ext2EXTRACT EXT2passthruRMTHOST 192.168.56.61,MGRPORT 7839,COMPRESSRMTTRAIL ./dirdat/satable zbdba.*;
Target DB:
GGSCI (zbdba2) 1> create subdirsGGSCI (zbdba2) 42> view param mgrport 7839DYNAMICPORTLIST 7840-7914USERID OGG,PASSWORD oggAUTORESTART REPLICAT *, RETRIES 5, WAITMINUTES 3PURGEOLDEXTRACTS ./dirdat/*,MINKEEPDAYS 3PURGEDDLHISTORY MINKEEPDAYS 7,MAXKEEPDAYS 10,FREQUENCYMINUTES 30PURGEMARKERHISTORY MINKEEPDAYS 7,MAXKEEPDAYS 10LAGREPORTHOURS 1LAGINFOMINUTES 30LAGCRITICALMINUTES 45 Create Replicat GGSCI (zbdba2) 1> view param ./GLOBALSGGSCHEMA oggCHECKPOINTTABLE ogg.checkpointGGSCI (zbdba2) 1> dblogin userid ogg,password oggGGSCI (zbdba2) 2> add checkpointtable ogg.checkpointSuccessfully created checkpoint table OGG.CHECKPOINT.GGSCI (zbdba2) 2> add replicat rep1,exttrail /ogg/dirdat/sa, checkpointtable ogg.checkpointREPLICAT added.GGSCI (zbdba2) 19> edit param rep1REPLICAT rep1ASSUMETARGETDEFSUSERID ogg, PASSWORD oggdiscardfile ./dirdat/rep1_discard.txt,append,megabytes 5DDL INCLUDE MAPPEDDDLOPTIONS REPORTBATCHSQLDBOPTIONS DEFERREFCONSTDBOPTIONS LOBWRITESIZE 102400HANDLECOLLISIONSDDLERROR DEFAULT DISCARD RETRYOP MAXRETRIES 5 RETRYDELAY 20--grouptransops 1--maxtransops 1APPLYNOOPUPDATESMAP zbdba.*, TARGET zbdba.*;start managerGGSCI (zbdba2) 23> info allProgram Status Group Lag at Chkpt Time Since ChkptMANAGER RUNNING REPLICAT STOPPED REP1 00:00:00 00:00:03
Test Data(Source and Target DB):
create tablepsace zbdab datafile '/opt/oracle/oradata/zbdba.dbf' size 100m;
create zbdba identified by oracle default tablespace zbdba;
grant dba to zbbda;
On Source DB:
User data pump:
expdp zbdba/oracle DIRECTORY=dumpdir
DUMPFILE=zbdba.dmp LOGFILE=zbdba.log
SCHEMAS=zbdba JOB_NAME=exp_zbdba_schema
DUMPFILE=zbdba.dmp LOGFILE=zbdba.log
SCHEMAS=zbdba JOB_NAME=exp_zbdba_schema
scp data to target DB
On Target DB:
impdp zbdba/oracle DIRECTORY=dumpdir
DUMPFILE=zbdba.dmp SCHEMAS=zbdba
JOB_NAME=imp_zbdba_schema
DUMPFILE=zbdba.dmp SCHEMAS=zbdba
JOB_NAME=imp_zbdba_schema
GGSCI (ogg2) 24> start rep1
Sending START request to MANAGER …
REPLICAT REP1 starting
GGSCI (ogg2) 26> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
REPLICAT RUNNING REP1 00:00:00 00:00:07
On Source DB:
create table test as select * from dba_objects;
Monitor OGG(Source And Target DB):
tail -100f ggserr.log
4 0
- Oracle GoldenGate Install For Linux
- Oracle Golden Gate - Install Oracle GoldenGate 11.2.1.0 on Linux
- Oracle install for redhat Linux
- GoldenGate的安装配置Redhat Linux for oracle 11.2.0.3
- Goldengate monitor v11.1 Install for LinuxX86
- Install Goldengate On Oracle Rac 11.2.0.4
- Oracle 12c agent install for linux
- Install for CentOS 7.1 & Oracle Linux 7.1
- OGG-01296 Oracle GoldenGate Delivery for Oracle OGG-01668 Oracle GoldenGate Delivery for Oracle
- goldengate for oracle 10g学习
- GoldenGate for Oracle 数据一致性初始化方案
- goldengate Linux平台Oracle RAC-Oracle
- oracle 8i/9i install for linux
- 我的ORACLE RAC INSTALL for LINUX 10.2研究
- How to install oracle 10g for Linux in ubuntu
- silent install oracle 11.2.0.1 x86_64 for linux
- Oracel 12cR1 install for Oracle Linux 6.6
- Configure Oracle GoldenGate for Oracle to Oracle Database Synchronization
- Windows驱动开发基础(五)驱动程序的数据结构
- C语言中的static变量
- UIView换UIImage
- 链表
- GetWindowRect和GetClientRect的区别详解
- Oracle GoldenGate Install For Linux
- LeetCode之旅(1)
- Rotate List
- 行内元素与块级元素比较全面的区别和转换
- Convert Sorted Array to Binary Search Tree
- Mongo使用
- 《javascript设计模式》读书笔记二(封装和隐藏信息)
- 互换两个变量,不使用中间变量
- 2015届毕业生的找工作记录