Install Goldengate on Oracle Rac 11.2.0.4

Source: Internet
Author: User
Tags dba

Installation Environment:

Source:OS:redhat 6.3db:11.2.0.4 Racogg:11.2.1.0.1target:os:redhat 6.3db:11.2.0.4ogg:11.2.1.0.1

RAC to a single transport configuration, where the test ogg is not put into the shared storage. It is recommended that the production environment put Ogg into shared storage to avoid a single point of failure.


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;  For Oracle DB versions 11.2.0.4 and 12.1.0.2 there would be a new Init.ora parameter called Enable_goldengate_replication. In order for some of the Oracle GoldenGate functionality to work, this parameter must bes set to true. ALTER SYSTEM SET enable_goldengate_replication = TRUE scope=both; Create 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 @m Arker_setup.sql script. This script installs support for the Oracle Goldengatemarker system, which are required for DDL support. You'll be prompted for the nameof the Oracle GoldenGate schema.2, Run the @ddl_setup. SQL script script that installs th E 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. Need to make multiplegrants if the processes has 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 is invoked with the Oracle GoldenGate DDL user name, as in:@?/rdbms/admin/dbmspool.sqlsql> @ddl_pin oggto Impro ve the performance of the DDL trigger this script pins the PL/SQL package, that's used by the trigger into memory. If executingthis script from Sql*plus, connect as SYSDBA from the Oracle GoldenGate home directory. This script relies to 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 45EXTRACTadd extract Ext1,tranlog, threads 2, begin Nowadd Exttrail/ogg/dirdat/sa  extract Ext1add rmttrail./dirdat/sa,extract ext1
When using ASM here, it should be emphasized that Oracle 10.2.0.5, Oracle 11.2.0.2 and subsequent versions of the database, Oracle provides a new ASM API interface that allows the extract process to access the database server directly redo and archive log. With this API, extract will get a read buffer of up to 4 MB maximum. The larger the read buffer, the easier it will be to improve the Extract process for environments with higher redo volumes. You can specify the size of the read buffer by using the dblogreaderbufsize option for tranlogoptions.
This scenario only needs to be added in the parameters of the extraction process:

Tranlogoptions Dblogreader
Other versions of the scenario:
Indicate ASM user password and archive path

Tranlogoptions asmuser [email protected], Asmpassword oracletranlogoptions Altarchivelogdest Primary instance test1/opt /oracle/arch, Altarchivelogdest Primary instance Test2/opt/oracle/arch

Configure Tnsnames.ora

ASM1 =  (DESCRIPTION = (    ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.56.52) (PORT = 1521))    (Connect_data =      (SE RVer = dedicated)      (service_name = +asm)      (instance_name= +asm1)    )  )
And the archiving of two nodes requires an NFS map.

The database version here is 11.2.0.4, so use scenario one

EXTRACT ext1setenv (Nls_lang = American_america. ZHS16GBK) setenv (oracle_sid= "test1") USERID ogg,password oggtranlogoptions dblogreaderddl &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 ' &inclu DE MAPPED OBJTYPE ' materialized VIEW ' &exclude OPTYPE commentddloptions addtrandata nocrossrename reportreportcount E VERY 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/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,passw ORD Oggautorestart Replicat *, retries 5, Waitminutes 3PURGEOLDEXTRACTS./dirdat/*,minkeepdays 3PURGEDDLHISTORY Minkeepdays 7,maxkeepdays 10,frequencyminutes 30PURGEMARKERHISTORY minkeepdays 7,maxkeepdays 10LAGREPORTHOURS 1LAGINFOMINUTES 30LAGCRITICALMINUTES Create replicat ggsci (zbdba2) 1> view param./globalsggschema Oggcheckpointta BLE Ogg.checkpointggsci (ZBDBA2) 1> dblogin userid Ogg,password oggggsci (zbdba2) 2> add checkpointtable OGG.CHECKP Ointsuccessfully 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 Z Bdba;grant dba to Zbbda;on Source db:user data pump:expdp zbdba/oracle directory=dumpdir dumpfile=zbdba.dmp LOGF Ile=zbdba.log schemas=zbdba JOB_NAME=EXP_ZBDBA_SCHEMASCP data to target Dbon target DB:IMPDP zbdba/oracle DIRECT Ory=dumpdir dumpfile=zbdba.dmp schemas=zbdba job_name=imp_zbdba_schema ggsci (ogg2) 24> start Rep1S Ending START request to MANAGER ... Replicat REP1 Startingggsci (ogg2) 26> info allprogram Status Group Lag at chkpt time Since chkptmanage R RUNNING replicat RUNNING REP1 00:00:00 00:00:07 on sour Ce db:create table Test as SELECT * from Dba_objects; Monitor OGG (Source and Target DB): tail-100f ggserr.log 








Install Goldengate on Oracle Rac 11.2.0.4

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.